Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Insight - CSV Import, Filter data source by IQL using Wildcard/Like

David Wimbush April 30, 2021

Hi,

I am importing a CSV into Insight and I want to split the contents into different object types.

For instance (CSV example):

name, db_version

db1, postgres_11

db2, postgres_12

db3, MSSQL_2003

The object types in my schema, in this case, would be PostgreSQL and MSSQL.

On the data import, I want to put anything that starts with postgres into the PostgreSQL Object type. I.e. I would like to utilise a 'like' operator with wildcards. 

However, I have trawled the internet and simply cannot find an explanation as to how this is done. I have tried the below:

db_version like "postgres"

db_version like "postgres%"

db_version like "postgres*"

db_version like postgres

db_version like postgres%

db_version like 'postgres'

db_version like 'postgres%'

db_version like 'postgres'

(each of the above variations have also been tried with LIKE)

Please note - The fields are configured correctly and if I input a specific version into the Filter data source by IQL section, for instance:

db_version = postgres_12

The results are as expected and any entry with that version will indeed go into the intended Object Type. 

Any assistance you can provide here would be greatly appreciated! 

Regards, 

Dave W 

 

 

 

 

 

1 answer

0 votes
Björn Gullander
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2021

Hi 

I'm not 100% on that this solves the problem for you but I tested with this configuration and it seems to work fine. 

What is important to note is that the "Filter data source by IQL" is not run on the source columns but on Insight objects created during import. This means that you need to store the db_version into an attribute in the target object type - in my case I call it "DB version". 

In your case you may benefit to use inheritance to be sure your DB object types contain exactly the same attributes. 

pssql.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events