Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
310 views
in Technique[技术] by (71.8m points)

pentaho variable same name job and transformation

I have a variable in the job called week_start and I also have a variable in a transformation inside this job also called week_start. My question is, if I put week_start in the job equal to 202021 and put week_start equal to 202030 in the job, which value the transformation will use when I execute from the job?

question from:https://stackoverflow.com/questions/65849642/pentaho-variable-same-name-job-and-transformation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you set any variable in the transformation you can not be used those variables in that transformation. Because all steps in a transformation run in parallel without a certain order of execution.

So, the rule is- you can set the variables you want to use in the first transformation of JOB.

Note:- If you set variables inside transformation, you can use those variables from job.

I have prepare a sample transformation & job for you HERE. You can get full idea from log after run the job where I have set 2 variables with same name 'week_start' in both transformation and job.

In short, if i want to give your answer then that will be "when you execute the job then value you use for job -will be/need to be use inside transformation"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...