ADF - CSV file with more than 2000 columns, need to create multiple tables in the sqlserver using Azure Data factory

Anil 40 Reputation points
2025-01-31T13:53:58.33+00:00

I have csv file with more than 2000 columns and 20gb file size. Have to create multiple tables in sqlserver from the csv file using Azure Data factory.

here is the file columns

col1 col2 col3 col4 col5 col5 ......

i have to create tables with below columns from csv file. Need to split the columns and create multiple tables.

First Table Second Table Third Table

col1 col1 col1

col2 col2 col2

col3 col4 col5

i am trying to use dataflow activity from Microsoft ADF, really not sure how to split the file by columns(shown above) and create tables in sqlserver.

Any help would be greatly appreciated.

Thank you,

Anil

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,209 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,641 questions
0 comments No comments
{count} votes

Accepted answer
  1. Amira Bedhiafi 28,381 Reputation points
    2025-01-31T18:28:13.4366667+00:00

    I would go for preprocessing your files first where you identify column grouping for each table and determine the primary key or identifier that links these tables.

    In ADF, you create a Delimited Text Dataset for your CSV file and define the schema manually or import the first row as headers.

    Then create a new Data Flow where you add a Source transformation and link it to the CSV dataset.

    Add multiple Select transformations to extract different column sets for each table.

    • First Table: Select col1, col2, col3
    • Second Table: Select col1, col2, col4
    • Third Table: Select col1, col2, col5

    Then you need a sink transformation for each table and configure the Azure SQL Database as the destination and don't forget to enable Auto Create Table or define the schema in SQL beforehand.

    0 comments No comments

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.