Variable in ODI

Variable

  • Variable used to store data.
  • At a time you can store only one value.
  •  Variable value can be String,Number or Date.
  • You can Pass this value at a run time

Where to use Variable

  • In package
  • In mapping
Let’s take one Example in which we will pass variable value at Run time.
In this Example our source is Database table.

Step 1: Right click on Variable and Select new Variable

a

Step 2: Give proper name of variable and data type

a

Step 3: write query and validate it

a1

Step 4: Create Target data store

a

Step 5: Give proper name and select data store type as table

a2

Step 6: Define attribute for target data store
a3

Step 7: Now we have source and target

a

Step 8: Create Mapping and

Just drag source and target into mapping area

Click on Join_date Attribute

Select on Expression to define variable expression

a

Step 9: Double click on hire_date variable

a

Step 10: Select integration knowledge module and
Run mapping

a

Step 11: See operator to view status

a

Step 12: right click and select data to view result

a

Step 13: you can see table data

a

Leave a Reply

Your email address will not be published. Required fields are marked *