Expand my Community achievements bar.

SOLVED

Test if column is empty after loading the data?

Avatar

Level 6

Hi, I've an importer that loads a CSV in order to fill  a table (schema). 

We're currently using a test activity to test if there is full data on all columns, but how to do the same of only 1 or n columns?

Our current test activity content: 

vars.recCount > 0

 
how to do test : if "emailcomercial" is empty or celularcomercial is empty end the workflow?


Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @god_prophet ,

After data loading activity, connect it with a split activity.

In split activity General tab, select 'Use the additional data only' radio button and select 'generate complement' checkbox. 

In Subset tab, add a filtering condition as emailcomercial is empty or celularcomercial is empty. 

Now connect this emailcomercial celularcomercial Transition to End activity and 'Generate complement' transition to Update data activity to load data into your schema.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @god_prophet ,

After data loading activity, connect it with a split activity.

In split activity General tab, select 'Use the additional data only' radio button and select 'generate complement' checkbox. 

In Subset tab, add a filtering condition as emailcomercial is empty or celularcomercial is empty. 

Now connect this emailcomercial celularcomercial Transition to End activity and 'Generate complement' transition to Update data activity to load data into your schema.

Avatar

Level 6

So, this would exclude all the emailcomercial or celularcomercial empty rows, allowing only to pass the rows with emailcomercial or celularcomercial not empty. 

Therefore, if all values in emailcomercial or celularcomercial are empty, the workflow would end?

I just want to make sure that if emailcomercial is empty but celularcomercial is not empty, process still needs to end. Or the other way around also. If any or both of these columns is empty , workflow must stop.  

Thank you.

Avatar

Community Advisor

@god_prophet , yes.

In your subset filtering condition, you need to give the condition as below

 

@emailcomercial is empty

OR

@celularcomercial is empty

ParthaSarathy_0-1697434973861.png

 

So, if your record satisfy in any one of the above condition or in both, that record will be in the output of this subset transition, and it will be connected to End activity.

ParthaSarathy_1-1697435104930.png