Reputation: 11
I have fixed length .DAT files in a ftp server and I need to use data flow activity and derived column transformation to do column mapping using ADF to be able to transform data before loading into a SQL Server table.
I need a solution where without any delimiter specified I am able to convert .DAT file to a dataset and use derived column transformation and then take substring for every column to do column mapping in a similar way as shown below:[![Column Mapping][1]][1]
I would need to update the dataset daily because new file would be added everyday to the ftp server.
Any help/snapshots are appreciate. Thank you.
Upvotes: 0
Views: 781
Reputation: 7758
Fixed width format is not natively supported as a Dataset. In order to process it, you'll need to parse the rows first. Here is a rough outline:
Perform any additional operations like trims (recommended) or type conversions.
Write the data to your Sink.
If the data file is really large, you might want to save the data to an intermediate location, like Parquet files, and then perform the write in another Dataflow. This should make the write to SQL perform better because it will be able to parallelize. It also gives you the opportunity to validate the converted data prior to writing it to SQL.
Upvotes: 1