Enable/Disable Tools execution based on Filter condition
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Friends
I need to write Alteryx Results in to DB Tables. Before writing, I need to check is there any data available in Staging table. If available write data into Archive Table and then write data to Staging. To handle this, I follow below steps.
- Reading count of records from Staging Table (1 - data exists/0-no data).
- Appending this value with actual data (simply)
- Checking in Filter about data count.
- Filter tool : If data exists, then in output File, I have Pre SQL statements to perform below and then write data into Staging table
- Insert into Archive table from Staging Table
- Truncate Archive Table
- If there is no data in staging, then data will be directly inserted into Staging table
However, when I execute Query, both output files are executed, instead of one output flow.
I thought, enabling/disabling containers will sort out issue. But, I dont know how to pass filter values to Containers. Please suggest me best practice to implement this.
Flow
In the below flow Output Data (105) Should not be executed as Filter conditions fails there.
Thanks
Antony
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Antony89anto ,
the Filter tool evaluates the condition, but unfortunately both results are executed. A possible solution could be to create a macro for the "write to file" part and use the Detour tool to decide, which part should be executed. I've attached a sample workflow writing to either F1.csv or F2.csv depending on the number of rows in an input table. What do you think?
Best,
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Roland
Thanks for your Support. I am not able to open this file. I am using version 2019.4.8 and seems like you r using higher versions. Is there anyway around?
Thanks
Antony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Right click the file and open it in notpad. In there you will see a line which looks something like this:
<AlteryxDocument yxmdVer="2020.1">. Change the number in blue to 2019.4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Roland!
One more question. Can't we do this with Containers?
Thanks
Antony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank You Abilash!
Thanks
Antony
