splitting target files using dynamic target creation
DESCRIPTION
The dynamic target files can be created using this document,we can split the table and can access the required target as in the required format.TRANSCRIPT
SPLITTING TARGET FILES USING DYNAMIC TARGET CREATION:
SO->SORTER->EXPRESSION->TRANSACTION CONTROL->TARGET
Step 1: Define the SOURCE
Step2: Create the TARGET FILE AS FLAT FILE and add the required columns, additionally add the FILENAME column
Step 3: Define the Mapping as M_DYNAMICTARGET
Step4: Drag and Drop the Source and the Target
Step5: Create Transformation SORTER to sort the Data based upon the DEPARTMENT_ID
Step6: Create Transformation EXPRESSION
Step7: Drag and drop all the fields from SORTER Transformation to EXPRESSION Transformation.
Step8: Edit EXPRESSION Transformation and the required flag files and output files as in the screen shot.
DEPARTMENT_ID (Change it as INPUT Port)
V_DEPARTMENT_ID (Variable port) =DEPARTMENT_ID
I_DEPARTMENT_ID (Variable Port) =DEPARTMENT_ID
V_FLAG (Variable Port) =IIF (V_DEPARTMENT_ID! =I_DEPARTMENT_ID, 0, 1)
O_DEPARTMENT_ID (Output Port) =V_FLAG
O_FILE (Output Port) =DEPARTMENT_ID||’.DAT’
Click on Apply and OK
Step 9: Click on Transformation->Create the Transformation TRANSACTION CONTROL
Step 10: Drag and Drop the required fields from the EXPRESSION TRANSFORMATION TO TRANSACTION CONTROL
Step11: Edit the Transaction Control and Go to the Properties Tab, Give the Condition as follows
IIF(O_DEPARTMENT_ID=1,TC_COMMIT_BEFORE,TC_CONTINUE_TRANSACTION)
Click on Apply and OK
Step 12: Connect the Ports from TRANSACTION CONTROL TO TARGET FLAT FILE
Step 13: Click on Save
Step 14: Create the Task and Workflow
Step 15: Connect the Required Source DB Connection
Step 16: Click on Apply and OK
Step 17: Start the Workflow
Step18: Find the Required Output