Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Filtering from a list InDB

paul_houghton
12 - Quasar

I have process which I need to filter a value In a snowflake db that appears in a list generated elsewhere in the workflow. Normally, I would use the IN operator (eg below where "ACCOUNT_PARENT" is the target field and Account is the second field with a list of values).

 

"ACCOUNT_PARENT" IN (Account)

When the filter is passed to Snowflake it is passed as a string not the actual values in the field and thus no result. Hardcoding the values successfully works but the list changes and I dont want to manually change the value everytime.

 

How would I get the list of values from the Account field to get populated into the filter and processed?

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @paul_houghton 

 

Why don't you join or append this column against you table and then filter out everything that does not match ACCOUNT_PARENT with Account?

 

Wouldn't that be a better approach?

 

Cheers,

paul_houghton
12 - Quasar

That is similiar to the solution I ended up going with. rather than appending I streamed in the list then joined against the list (rather than a filter).

 

I was initially resistant to this idea as I had multiple fields to filter. I later realised that streaming in all the filters as a single list works because the records from the different fields don't impact the results (but have a small impact on join performance. 

 

This doesn't address the issue of why the contents second field in the filter is not passed to the database to calculate. What is getting passed through is the field name rather than the field contents

Labels