Dynamic table creation in Pre-Copy script through ADF

Mohanraj Ramalingam 150 Reputation points
2023-08-26T17:11:37.0066667+00:00

Hi All,

I have parquet files year, month wise in ADLS. Now, I need to copy the data from these parquet files and push it to corresponding customer tables in Azure SQL Managed instance. In the destination we don't have these customer tables already create. So, I want to dynamically check if the table exists in destination location before copying the data and if the table is not there then I need to dynamically create those individual customer tables and then push the data.

Is it possible?

Regards,

Mohanraj

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,145 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,988 questions
0 comments No comments
{count} votes

Accepted answer
  1. Subashri Vasudevan 11,206 Reputation points
    2023-08-27T07:36:51.8533333+00:00

    Hi

    You can use copy activity and auto create table option in the sink settings to achieve what you want. Please go through this documentation for more details. For you to use this feature, make sure to pass the table name to data set dynamically.

    Here is a video reference for the same.

    Hope it helps.

    Thanks.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.