Tuesday 28 August 2012

AUDIT TRANSFORMATION





Introduction:
            Using audit transformation we can add new columns (The new columns contain package execution environment details) to the target along with the source columns. 

  • Execution Instance GUID      : Identifies the package execution instance.
  • Package ID                           : Unique identifier of the package
  • Package Name                     : Name of the package
  • Version ID                            : Version of the package
  • Execution Start Time            : Package execution started time
  • Machine Name                     : Machine name
  • User Name                           : User name
  • Task Name                           : Name of the “Data flow task” (which task that the Audit  transformation is associated).
  • Task ID                                 : Unique identifier of the data flow task
 
 Requirement:
            Source table (Sample_source) is having "ID, Name and price" fields, shown below.


Package creation:
  • In “Control flow” drag and drop the data flow task into designer surface. Edit the "Data flow task". In data flow drag and drop the “OLEDB source” into designer surface and map the source table.
  • Drag and drop “Audit” transformation into designer surface. Connect the “OLEDB source” green arrow to the “Audit transformation” after that edit the “Audit transformation” (right click on Audit transformation and select “Edit” option). “Audit transformation editor” window will open.



  • In the editor window click on the “Audit type” box, shown in the above screen shot. Then drop down list will open.
  • Choose required fields information from the dropdown list.



  • Click on “OK” button to finish the audit column mapping.
  •  Drag and drop “Flat file destination” into designer surface and give the required mappings (File path, file name etc).



  • Once target file mappings get finished, execute the package.



Target file output:


 
 
 









No comments:

Post a Comment