Is it possible to pass a job parameter inside another?
Moderators: chulett, rschirm, roy
Is it possible to pass a job parameter inside another?
Hi,
Here's what im looking for
let say i have i have a parameter by the name
parcode = 'abc'
and i have another parameter
partranslation = 'alphabets #parcode#'
when i use the parameter partranslation in my transformer it is displaying "alphabets #parcode#" instead of "alphabets abc".
Is there a way in which i can get to DS to parse a job parameter which is within another parameter??
Thanks,
Abhinav
Here's what im looking for
let say i have i have a parameter by the name
parcode = 'abc'
and i have another parameter
partranslation = 'alphabets #parcode#'
when i use the parameter partranslation in my transformer it is displaying "alphabets #parcode#" instead of "alphabets abc".
Is there a way in which i can get to DS to parse a job parameter which is within another parameter??
Thanks,
Abhinav
If you can't achieve this "parameters within parameters" functionality, to produce full SQL on the fly, I think you will have to look instead at doing this upfront and passing the finalised SQL query as one final parameter to the job, with a call to this parameter as your user-defined SQL statement.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Thanks for the suggestion sainath... but the entire query keeps changing depending on the user requirment. So i will not be selecting the same columns everytime.
case when for a specific output i ,might use the query
case 1
select name,deptid from #parcode# table where table.col1 = #par1#
and table.col2 = #par2#'
case 2
select deptname,branch from #parcode# table where table.col1 = #par2#
and table.col2 = #par1#'
So here my entire query is dynamic.
Would appreciate it if u could help me out in such a case!
Thanks,
Abhinav
case when for a specific output i ,might use the query
case 1
select name,deptid from #parcode# table where table.col1 = #par1#
and table.col2 = #par2#'
case 2
select deptname,branch from #parcode# table where table.col1 = #par2#
and table.col2 = #par1#'
So here my entire query is dynamic.
Would appreciate it if u could help me out in such a case!
Thanks,
Abhinav
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
@Sainath
i was not able to understand ur solution.. how will the use of two extra parameters solve my problem..
The queries that i posted are a mere sample of the original ones..
The original queries are more than 500 lines each and there are multiple places where i need to replace the parameters..
@miwinter
I dont have fixed number for each query, one query might have 100 columns the other may have 200 so i cant as such parametrize them..
i was not able to understand ur solution.. how will the use of two extra parameters solve my problem..
The queries that i posted are a mere sample of the original ones..
The original queries are more than 500 lines each and there are multiple places where i need to replace the parameters..
@miwinter
I dont have fixed number for each query, one query might have 100 columns the other may have 200 so i cant as such parametrize them..
So, your plan is to have a single job that can process any number of columns from any number of tables? And then what do you need to do with these columns? Hopefully nothing in the way of transformations if you think RCP is going to be your big saviour here.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Ur was a city in ancient Babylon; it has not existed for thousands of years and is therefore probably beyond understanding anything - even assuming that a city can understand at all.yabhinav wrote:The example i gave was just to for ur understanding.
The second person personal possessive pronoun in English is spelled "your".
Please strive for a professional standard of written English on DSXchange. It helps particularly those whose first language is not English. English is hard enough to understand without idiosyncratic abbreviations.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.