I previously created a copy activity to copy all columns in sql table into ADLS in parquet format.
I am new to Azure data factory. So my question is how would copy only a specific set of columns into Azure data lake storage as Parquet?
I previously created a copy activity to copy all columns in sql table into ADLS in parquet format.
I am new to Azure data factory. So my question is how would copy only a specific set of columns into Azure data lake storage as Parquet?
3
Answers
In sink, use the Parquet dataset.
When copy activity is executed, only selected columns from SQL table gets copied to data lake.
Preview Data of Source
You can even restrict via mapping table and delete unnecessary fields, so that only the selected fields will get copied to the destination file or table of your interest.
If you have a different table on each loop iteration, I assume the list of tables you’re parqueting is stored in a control table of some kind?
So add the fields required from each table also to the control table.
Lookup from this table to obtain the table and field names, be sure to untick firstrowonly.
Pass the output into your ForEach loop:
Finally access the table name and fields in the copy block query: