Since you can't specify column names manually for all 69 files, you can use mapping data flow or data transformations in ADF.
You can create a pipeline where you use the Get Metadata activity to retrieve the list of files from the source folder in your ADLS Gen2.
Configure the Field List property to include Child Items
in this way you will have the list of all files in the directory.
Then add a For Each activity to iterate through the files obtained from the Get Metadata activity.
Within the loop, use a dynamic expression to pass the file path and name to subsequent activities.
Inside the loop, add a Data Flow Activity:
- Source Transformation:
- Use the file path dynamically for the source dataset.
- Enable Schema Drift to infer schema dynamically (avoiding manual column specification).
- Derived Column (Optional):
- Add a column that flags rows with null values in any field.
- Filter Transformation:
- Create two filters:
- Rows with null values in any column.
- Rows without null values.
- Sink Transformation:
- Route the two filtered outputs to different sinks:
- One sink for files with null values.
- Another sink for qualified files.
In the sink configurations you can use expressions to dynamically create output file paths based on whether the data passed the null check or not.
Qualified Data Path: <destination-folder>/qualified/<file-name>
Null Data Path: <destination-folder>/null/<file-name>