Monday, June 13, 2016

How to pass runtime value to a package in ODI?

For Example:
Organization : 'X'
Child Organization : 'A'
Second Child Organization : 'B'
Third Child Organization : 'C'
Requirement I need to pass runtime child Organization name to my package. That means whenever I am executing package I need to mention what is child Organization we are going to load now.

Solution:
Step 1:
Create a variable V_CHILD_ORGANIZATION

Step 2:
Create a mapping whose child_organization (i.e., target column name) mapping should be #V_CHILD_ORGANIZATION

Step 3:
Create a package and drag and drop that variable (V_CHILD_ORGANIZATION) and drag and drop Mapping

Step 4:
Select that variable and make it as declare variable and select 'ok' control flow and link the variable and mapping.

Step 5:
Generate Scenario for that package and select the variable which there in that package while generating scenario

Successfully Created!!!

Execution:
Execute that scenario with corresponding context and agent then it prompt for Variable value.
If you want to change the value then you need to disable the latest value check box and you can provide whatever value you want (i.e., 'A' or 'B' or 'C')

No comments:

Post a Comment