Sort transformation sorts the input data in ascending or descending order and sends to the transformation output.
Example:
I am having a source file “Sort”,
that contain persons information shown below screen shot.
The source data I want save it into
another file “Sort_Target”, the target file data should be in descending order
based on ID column.
Package creation:
- Open BIDS.
- From control flow items, drag and drop “Data flow task” into designer surface.
- Go to “Data flow”, from data flow items drag and drop “Flat file source” into designer surface. Configure the flat file source with source file.
- From Data flow items drag and drop the “Sort” transformation into designer surface.
- Connect the “Flat file source” green arrow to the “Sort” transformation.
- Right click on the “Sort” transformation and select “Edit” option. Then “Sort Transformation Editor” window will open.
- Select the required column to sort the data based on that column, and then select the Sort type.
- Click “OK” Button to complete the sort transformation mappings.
- From data flow items drag and drop the “Flat file destination” into designer surface and connect the “Sort” transformation green arrow to the destination.
- Edit the “Flat file destination” and configure the target file.
- Execute the package.
Target file “Sort_Target” data:
Target file
data is in descending order.
No comments:
Post a Comment