Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, Qlik community!
I am in on-prem Compose trying to map a table from the source to a filtered table in the data warehouse.
When [source].[record_type] = 'O', that record should be added to the target DW table. I have set up and tested the filter, which seems to work correctly within the Filter Editor.
However, when I generate the task statements and run them, all of the rows with other [record_type]s are also included in the resulting table.
I combed through the statements individually, and tested directly on my source database the SELECT used to populate the filtered staging table. It returns only the filtered records as expected.
What am I missing here? Thanks for helping me learn this valuable tool!
It turns out that yes, I was misunderstanding how the filters work. They won't remove records already in your target table, even if they don't meet the condition; they only look at the source and INSERT records that meet the condition and are not in the target.
Clearing out the table and rerunning the task statements did the trick for now.
Thank you for joining me on this saga. I hope it has been informative for you!
Have continued exploring, and found this tidbit which may be of interest:
The staging table gets populated correctly (161/241 records should be included)
However, when it comes time to update the target table, nothing happens:
Maybe I am misunderstanding how the filter mechanism is supposed to function?
It turns out that yes, I was misunderstanding how the filters work. They won't remove records already in your target table, even if they don't meet the condition; they only look at the source and INSERT records that meet the condition and are not in the target.
Clearing out the table and rerunning the task statements did the trick for now.
Thank you for joining me on this saga. I hope it has been informative for you!