Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Send package variable using batch script in ODI

Las071214Sep 26 2016 — edited Sep 28 2016

Hi,

We have a package where we have a variable 'period' which we change every month in batch file( like May-16,Jun-16 etc)

While generating/regenerating the scenario , we have checked this variable.

We use a batch script to run the scenario where we pass the variable through batch as below :

startscen.bat EXEC__PACKAGE_VER 001 PROD     "-KEYWORDS=abc"      "PROJECT1.PERIOD=Jun-16"

1. Scenario runs fine only if we update the period variable in package manually.

2. Scenario is getting failed if we remove the variable value in package and pass through variable only through batch (with error : ODI-17506: Variable has no value)

3. ODI is taking package variable value if the variable value given in package and batch are different.

Could any one suggest how can i pass variable value into scenario through batch.

Thank You!

Regards

Sowjanya Rayala

Comments

rpc1

Did you declare your variable before using in package? if you want to pass variable value through scenario

you have to declare it first

pastedImage_0.png

Las071214

Hi @"rpc1"

Thank you very much for the quick reply with screenshots.

I just checked my package and the variable is declared.

Are there any other options or parameters i have look at ?

Thanks again!

Regards

Sowjanya Rayala

rpc1

I little confused, you don't need extra parameters,

look at example, I pass variable and throw it in exception

pastedImage_0.png

Please make sure that in odiparams you use right work repository

Las071214

Hi,

I just wanted mask the original keyword and hence gave abc.

We have a different keyword in our package and we never get this error.

Thanks !

Regards

Sowjanya Rayala

Las071214

Hi,

Can any one please suggest on this.

We have a variable in package (Declare Variable). We are trying to pass the varaiable value through batch.

But package is not taking batch variable. It is taking the Default Value given to the variable. If Default Value is left blank, package load is failing with below error.

ODI-17506: Variable has no value

Thank You!

ASP_007

Hi Sowjanya

Look at this post talks about similiar issue. Hope thats is useful

Variable has no value when executing a scenario

Regards

ASP

rpc1

This is only example, that variables works fine in startscen utility.

Could you show variable definition. I can't understand what is wrong. You have to check all twice you package, recompile your scenario,

may be you have mistake in passing variable? For example you have similar variables in different projects......

Does your package belongs to PROJECT1?

Las071214

Hi @"rpc1"

Thank you for the inputs

I have created a new variable (declare variable)  and inserted in the package flow.

I still face the same error.

Do I have to give any query in Refreshing tab for the variable.

Please suggest. Thank You!

Regards

Sowjanya Rayala

rpc1

No you don't need to fill refresh query because you don't use this variable as refresh.

You pass values  only... What is ODI version do you have?

try to create new package with you variable and generate scenario then try to start it

1 - 9
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 26 2016
Added on Sep 26 2016
9 comments
611 views