I have extracted data from a SQL Server table, including a "Bit"-type column.
Now, in Matillion, when I use a Table Input component to use that raw data, I have a "Boolean"-type column.
I want to use a Filter component to only include rows where the value of the Boolean column is 'false'. How to do this?
When I look at sample data, on the Table Input component, the possible values of the Boolean column appear as 'true' or 'false'.
But when I put the following in the Filter component... Boolean column / Is / Equal To / true ...it doesn't work.
Is there a way to use the Filter component on Boolean data?
If not, I suggest adding it, please. Maybe, in the "Filter Conditions" properties of a Filter component, under Comparators, add 'True' and 'False' as options. So I could say... Boolean column / Is / True Boolean column / Is / False
3 Community Answers
Kevin Havice —
Oops, I said "I want to use a Filter component to only include rows where the value of the Boolean column is 'false'." Then I said I set my Filter Conditions to "Boolean column / Is / Equal To / true"...
...I should have said I set my Filter Conditions to "Boolean column / Is / Equal To / false"...
It doesn't matter, though...those Filter Conditions don't work at all to filter boolean-type data, and I don't see other options in the Filter Conditions to make it work. I just want to know, in general, how do you do this?
I can’t seem to reproduce the issue you are describing. I’ve defined a test table in Redshift with a single boolean column. I then populated that table with two values, “true” and “false”. I then sent that table to a Filter component, where if I set the Filter Condition to be equal to “false” or equal to “0”, it filters as expected and I get only the “false” record as the output.
If you are not experiencing this behavior, we might need to take a closer look at your job. If you need some assistance in debugging your job further, you can open a request by emailing us at email@example.com with your example job.