Wednesday, 5 September 2012

SPLIT SOURCE DATA INTO TWO FILES

Requirement: If you want package creation requirement click here
 
Package creation:

  • In control flow drags and drop “Data flow task” into designer surface and then edit.
  • In data flow drag and drop the “Flat file source” into designer surface and map the source file( Flat file source mapping click here).
  • Drag and drop the “conditional split” transformation into designer surface.
  • Connect the “Flat file source” green arrow to the “Conditional split”.
  • Right click on the “Conditional split” and select edit option. Then “Conditional split transformation editor” window will open. 


  • We need to write our conditions in “Condition” box.
    • Condition to extract the record name ending with “e”
      • RIGHT(Name,1) == "e"
    • Condition to extract the record name ending with “k”
      • RIGHT(Name,1) == "k"


  • Click “OK” button.
  • Drag and drop two “Flat File Destination”.


  • Select the “Conditional Split”, connect the conditional split green arrow to flat file destinations. 


  • Edit the “Flat File Destinations” and map the target files (For mapping click here).


  • Execute the package.


Target files output:
Target1:


Target2:





No comments:

Post a Comment