I am trying to resolve some questions I have around how to create variables in a workflow and then pass them into "Action" tools to dynamically change a tool's behavior. I know how to do this with a text box or date picker, but how do you do it when the value you want is in the workflow preceding the tool?
I am trying to get a current snapshot for the month and overwrite those values to a table with 100's of million of rows in SnowFlake. I am trying to dynamically delete the current month and then just append. I am not sure if this is any better than the other common use of key tables to determine what to keep from the source table and what new/updates are coming in and rebuilding the entire table.
Date found in previous step:
2021-12-01
2022-01-01 (max) --> Trying to feed this to a drop-down interface tool and then an action to update the Output tool's pre-sql statment.
I want to update the simple pre-sql in an output tool to remove that max dates info, so I can add a refreshed MTD view of that data.
DELETE FROM TABLE MYTABLE WHERE DATE IN ([REPLACEME])
Hi @john_watkins, you can dynamically update the pre-sql statement if you have that in a macro. On this case you don't even need the drop down interface tool.
So basically just put the Output tool in a macro and pass the variable. I was hoping I could do it without adding a macro layer somehow.
Unfortunately you will need a macro.