Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
sushantk19
Creator
Creator

How to pass multiple values to a context

Hi,

 

Is there a way we can define & pass multiple values to a context? e.g

 

context.brand_id=(1,2). how to define this in contexts tab? context.brand_id= "1|2"?

Labels (2)
26 Replies
Anonymous
Not applicable

@sushantk19 : not together but yes multiple values you can define in a parameter txt file like: context.brand_id;1 context.brand_id;2 either load using tcontextload or implicit context load (or store in DB). Let me know if that makes sense !
Anonymous
Not applicable

@sushantk19 : not together but yes multiple values you can define in a parameter txt file like: context.brand_id;1 context.brand_id;2 either load using tcontextload or implicit context load (or store in DB). Let me know if that makes sense !
manodwhb
Champion II
Champion II

@sushantk19 , yes agreed with @snayak , you need to maintain a table or file from there you need to iterate and pass one parameter by one and you need to complete your downstream flow.

manodwhb
Champion II
Champion II

@sushantk19 , yes agreed with @snayak , you need to maintain a table or file from there you need to iterate and pass one parameter by one and you need to complete your downstream flow.

sushantk19
Creator
Creator
Author

@snayak : Thanks. Do i need to change my existing job design. Frankly, speaking i would not like to do this as we are in QA phase now Smiley Sad I have attached my job design for your reference. ALso, can u share any link or job design how this can be implemented? what do you mean by implicit context load??

sushantk19
Creator
Creator
Author

@snayak : Thanks. Do i need to change my existing job design. Frankly, speaking i would not like to do this as we are in QA phase now Smiley Sad I have attached my job design for your reference. ALso, can u share any link or job design how this can be implemented? what do you mean by implicit context load??

sushantk19
Creator
Creator
Author

job design is attached.


context_multiple_values.png
sushantk19
Creator
Creator
Author

job design is attached.

Anonymous
Not applicable

simple solution: prepare your context parameter file x;1 x;2 then pass this file as normal tfileinputdelimited > tflowtoiterate> Iterate link to your entire job (or use that job as tRunJob) when you run your mother job , the value of x will be passed one by one for every iteration. Possible to do the same thing in different ways also. Feel free to give kudos to solutions, if it helps !