Hi,
I and @gantaanvesh have this requirement to create an empty table on Snowflake with Dynamic Suffix and the table definition should match an existing table in Snowflake.
I went through the posts:
I have tried doing something like this but my Output Tool is unable to create Snowflake table. Any idea? What could be missing?
UPDATE::: The output data tool is able to create Snowflake table with a static name. But when the output data tool properties are updated to add table suffix from a field then the workflows cannot create a table.
1. You could embed the logic to create the table in a macro so you can pass in the field name and change it that way via an input or parameter (batch macro).
2. Use the dynamic input In-db tools
Create a temp table with no rows. Then you can use the Dynamic Output In-Db to get the query which will contain the name. Create a new query based on that query with your actual table name as part of the formula to build the query.
Seems the dynamic input in-db may not let you create your own Create Table (DDL) scripts. This would allow you to just change the string and change the name of the table. A batch macro would allow you to pass the name as a normal parameter and simply change it that way as well.
You are right about dynamic output in-db.
I will try the macro as suggested.
Thanks for your quick response, John.