Tuesday, August 2, 2016

How to create relationship between options and task in ODI procedure?

Scenario:
There are three steps in procedure based on the option value I need to skip or execute task in ODI procedure.

For Example:
Step 1: Create Table
Step 2: Truncate Table
Step 3: Insert record into table

Options:
Create
Truncate

If I select create option value as true then it needs to create table.
If I select Truncate option value as true then it needs to truncate table.

Approach:
Step 1:
Create a procedure
With three tasks as follows

Step 2:
Create two options (go to option tab and click on '+' symbol)
Step 3:
Select Create Option and go to property inspector and then expand options -- Disable Always execute check box and enable Create check box as follows
Step 4:
Repeat step 3 for truncate and change accordingly

Step 5:
Create a package.
Drag and drop procedure into package --  go to options tab -- select create option and set value to "true"

Step 6:
Execute it

Output:

In above execution, it skipped truncate step

Step 7:
Now we will check by changing the options as create - "false" and Truncate as "true"

Step 8: 
Execute Package

Output:

In above execution, it skipped create step

[Note: As mentioned in above steps our knowledge modules will work]

No comments:

Post a Comment