Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
BA621858188
Creator
Creator

Blank value using tfilterrow

Hi All,

 

I want to check and filter blank values from a file based on an integer column and using the tfilterrow component. How can I use the tfilter row component properties. Can anyone help me on this?

 

I am doing currently as below:

column - (integer column)

function - empty.

operator - equals

value - ""/'' (this is giving me an error)

 

Appreciate your help.

Labels (4)
20 Replies
Anonymous
Not applicable

Make sure the nullable box is checked on tDBInput component, while this option is enable, the component will read the null value as null, otherwise, it is 0 for int type.

 

BA621858188
Creator
Creator
Author

@Richard Hall​ 

 

I was just trying by putting value as ""/"" but its not the correct one. The data type at source and target both end is integer only.

BA621858188
Creator
Creator
Author

Hi @tech seeker​ ,

 

Is the col1 and col2 are of integer type?

 

Can you put value for both cols as blank as you gave the value 345 for col1?

 

I have completed full blank line at the end and need to remove it using filter row

BA621858188
Creator
Creator
Author

Hi @tech seeker​ ,

 

This is the same as Scenario where need to ignore the last line from pipe delimited file.

where you have mentioned to use tsystem component to use. I am trying the same using filter row. Is it possible to ignore the end line (blank).

BA621858188
Creator
Creator
Author

@Shicong Hong​ ,

 

I did this as well, but it didn't work.

Anonymous
Not applicable

OK, for debugging, try to print the value on a on tJavaRow to see what value it is, null or empty string?

System.out.println(input_row.columnName);

 

or check if the value is null or empty string, eg:

if(input_row.columnName==null){

System.out.println("It is null value");

}

if(input_row.columnName.equals("")){

System.out.println("It is empty string");

}

 

Check and confirm what value it is before you do the filter.

 

Regards

Shong

 

rhall1
Contributor III
Contributor III

@Vrushabh Malbari​ It might also help to see a screenshot of the schema setup of the source, target and the tFilterRow components. It sounds to me like there is an issue here. If you can supply ""/'' to the column, it isn't an integer.

 

Also, int cannot be null. Integer can be null. So you need to make sure that your column is set to Integer and not int.

BA621858188
Creator
Creator
Author

Hi @Richard Hall​ ,

Its integer in schema. I am supplying null in value and not "/"".

BA621858188
Creator
Creator
Author

Hi @rhall (Customer)​ ,

Its integer in schema. I am supplying null in value and not "/"".

BA621858188
Creator
Creator
Author

Hi @Shicong Hong​ ,

 

OK, for debugging, try to print the value on a on tJavaRow to see what value it is, null or empty string?

System.out.println(input_row.columnName);

 

or check if the value is null or empty string, eg:

if(input_row.columnName==null){

System.out.println("It is null value");

}

if(input_row.columnName.equals("")){

System.out.println("It is empty string");

}

 

Check and confirm what value it is before you do the filter.

 

where I need to use the above code in my design.

 

My design is as below:

 

tdbinput--> tfileoutputdelimited --> tfilterrow --> tfileoutputdelimited

 

So you want me to use tjava in between tfileoutputdelimited-->tfilterrow?

 

If yes, I have done that, but I just got the values, not "it is null" or "it is empty."

 

But still, I am getting one extra line (blank) in my target output file.