Hey, Please follow the below process 1) use get metadata activity to get filenames 2) pass the output of get metadata activity child items as input to a for each activity 3) within foreach activity use a copy activity with source as blob with filename as item(). Name and sink as sql with table as item(). Name
How to import data from parquet files to sql tables where filenames = schema.tablename
I have several parquet files in Azure storage.
They all have filenames formatted as schemaName.TableName.Parquet
I need to use expressions to load the files to their destination tables.
For ex:
dbo.Client.parquet file IS LOADED to destination table dbo.client
dbo.Table2.parquet file IS LOADED to destination table dbo.Table2
Stage.Table3.parquet file IS LOADED to destination table stage.Table3.
etc...
I have a Get Metadata activity with child items so I can see all the filenames.
I have a linked service to the destination server/database.
I have a generic dataset for the destination sql table.
Do I need a for each with a copy activity?
How do I tell it to use the output of metadata and load to the destination table?
Your help is much appreciated!
2 answers
Sort by: Most helpful
-
-
Nguyen, Hoa 381 Reputation points
2023-02-13T21:16:32.25+00:00 For sink, I used the split function to get the Schema name and table name as seen below.
That worked well for me. Thanks!