How to output the SQL statement that was executed in Snowflake - Execute pipe?
Hello,
I have designed this pipeline that:
- Generate a month range as $date_1 and $date_2
- These variables are inserted into a SQL statement in the "Snowflake - Execute" pipe
- Then this is inserted into SSMS
I want the filled SQL statement with the variables that was executed successfully and insert into SSMS as well. Example, if the SQL statement is "SELECT * FROM TABLE WHERE date >= $DATE_1 AND date =< $DATE_2" then I want the SQL statement executed which lets say its "SELECT * FROM TABLE WHERE date >= '2024-02-01' AND date=< '2024-02-28'" and insert this into ssms.
Is there any way to create two streams after the "snowflake execute" one for the SQL server bulk load and another one to extract the SQL statement filled with variables or perhaps after the SQL server bulk load?
Thank you!
Hello rpc1235x,
You can produce the query string in the Datetime Fixer Mapper, and pass it as is to the Snowflake Execute Snap with Pass Through enabled.
That way you will have the query string in the original attribute downstream.
Regards,
Aleksandar.