Forum Stats

  • 3,814,138 Users
  • 2,258,824 Discussions


Default ODI variable value not visible in scenario run

3673816 Member Posts: 79
edited Oct 24, 2018 9:42AM in Data Integrator

Hello forum.

I have a variable in ODI whose value will be pretty static/persistent. So, I'd like to define it once and make it visible within all packages/scenarios that will use it.

Also, I'd like to define it in a single place, so that if it does change later, I'll have one place to go to, to change it. So, I'd like to avoid defining a "set variable" type with a literal in each package.

I could have done a refresh variable with a query like SELECT '<my-static-value>' FROM DUAL, but that's a trip to the database for every call in every package. I'd like something more performant than that.

I tried just setting the default value in the variable to my static value, but I noticed that when I run my packages using that variable, the default value is never resolved, regardless of the type I make the variable in the package (I tried refresh variable, set variable, declare variable).

So, why is the default value not kicking in? And if it's not the right thing to use, is there an alternative?

Thank you




  • elb666
    elb666 Member Posts: 104
    edited Oct 24, 2018 9:42AM

    Hi Boris

    Which version of ODI are you using?
    This is  I create a new variable and set the default value to 'foo':


    Then I use it in a procedure:


    When I run the procedure, we can see that the variable has taken the default value:


    I change the default value of the variable:


    And re-run the procedure (didn't re-save or otherwise modify the procedure), and the new default value shows up:


    Note that I didn't run a refresh of the variable at all.

    If this doesn't work for you, can you show specifics of how it is failing?