Database migration from SQL Server to Snowflake in Jitterbit Cloud Studio

6ovsh4lw  于 2023-06-21  发布在  SQL Server
关注(0)|答案(1)|浏览(114)

Currently, I am trying to migrate tables from SQL Server to Snowflake in Jitterbit Cloud Studio.

For that, I would like to build a Jitterbit process with operations like this:

[Operation 1: Select all table names from SQL Server] {for each table name, call Operation 2} -> [Operation 2: (Select the metadata of the table from SQL Server) -> (Generate create table SQL query for Snowflake) -> (Execute the create table SQL query)] -> [Operation 3: (Select all data from the SQL Server table) -> (Insert into the Snowflake table)]

I am now trying to build Operation 3 which needs to execute a dynamic query to select fields from the SQL Server table and then insert into the Snowflake table using dynamic SQL. I need to use dynamic SQL because the fields I will select and insert depend on the table I am processing.

Could someone please give me any pointers on how to make this workflow dynamic?

chy5wohz

chy5wohz1#

A few things to point you to:

  1. Jitterbit supports several database-related functions . These only apply to the generic Database connector, so they would be helpful for pulling the data out of the SQL tables. This list includes a function for calling a stored procedure.
  2. The Database connector also allows for manual queries if you prefer to use that. The text box where you enter the SQL statement can accept global variables.
  3. The Snowflake connector also supports invoking a stored procedure , which is probably your best bet as the activities for inserting/updating require selecting a specific table.

相关问题