Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 63 Insurance
- 535.7K On-Premises Infrastructure
- 138.1K Analytics Software
- 38.6K Application Development Software
- 5.6K Cloud Platform
- 109.3K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71K Infrastructure Software
- 105.2K Integration
- 41.5K Security Software
Default ODI variable value not visible in scenario run

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
Boris
Answers
-
Hi Boris
Which version of ODI are you using?
This is 11.1.1.7. 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?
Regards,
Eric