07-22-2024 12:24 PM
Hello,
I have designed this pipeline that:
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!
Solved! Go to Solution.
07-23-2024 04:12 AM
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.
07-23-2024 01:00 AM - edited 07-23-2024 01:01 AM
After Datetime Fixer Mapper you can add a Copy Snap and downstream Mapper Snap in which you can add the same query from the Snowflake Execute Snap (where dynamically you are passing the both dates).
07-23-2024 04:12 AM
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.
07-25-2024 01:09 PM
Thank you! I ended up using this solution.
If it helps others, here is how it looks:
Inside mapper 2, included: