Ho can I use Oracle ODI Variables in an ODI mapping

84 Views Asked by At

I am new to Oracle ODI, and I am learning it. I want to know how I can use the value of an ODI variable within a mapping. And also its reverse, that is, how to assign a value to a variable from within the mapping.

My project has a project level variable of numeric type. I want to use it in one of my queries in the the mapping. That is, the query will be based on value of the variable and also, at the end of mapping, I want to assign a value of 0 in case of success, and 1 in case of errors in mapping.

I read a lot of documentation on Oracle ODI, but couldn't get a solution. Can someone please help with this? Thanks in Advance.

1

There are 1 best solutions below

0
Dreadnought On

To use the value of a variable in a mapping you need to:

  1. Select the field on the target table in your mapping where you want that value populated
  2. Go to the properties pane and click in the expression's pane
  3. Click on the cog that appear on the right
  4. Expand either Global/Project Variables and double-click your variable
  5. Save and regenerate the mapping's scenario

Next time you run this scenario, it will use the variable's query to populate a variable in this field.

You can't assign value to a variable from within a mapping. What you could do is have a mapping populate a value into a table, then have the variable feed off that table.

Let me know if this doesn't make sense