Multiple context groups in a job

Four Stars

Multiple context groups in a job

I need to use 3 separate DB connections in my job. I do not want to hard code the connection details & hence plan to use the context variables & 3 context groups. How can I ensure that when the same context environment is selected it gets reflected in all context groups?

Forteen Stars

Re: Multiple context groups in a job

Environment affected to all groups and standalone context variables in Job

 

but You can easy - load values from csv file and do not store nothing in Studio, only variables names

-----------
Four Stars

Re: Multiple context groups in a job

Can you plz help how to read from CSV files & then read in my job.
Fifteen Stars TRF
Fifteen Stars

Re: Multiple context groups in a job

Can you detail your question?

TRF
Moderator

Re: Multiple context groups in a job

Hi,

You can refer to the related scenario "Reading data from different MySQL databases using dynamically loaded connection parameters

" in component reference about: TalendHelpCenter:tContextLoad 

 or the implicit context feature TalendHelpCenter:Configuring the Implicit Context Load feature.

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: Multiple context groups in a job

Team, How to implement the same logic for a job already built and exported, in that case the prompt will be coming ? I have a scenario where the source and target path of the job keeps changing based on the environment. So i have that path in a config file like below, which I will change based on the environment. Config File : source;C:/users/temp/ target;C:/users/name/ Now in real time how to use this file to resolve the context variables.
Fifteen Stars TRF
Fifteen Stars

Re: Multiple context groups in a job

You just have to read the config file with tFileInputDelimited then use a tJavaRow component to set the desired context variables with the field values like this "context.yourVariable = input_row.yourField;".

Hope this helps.

TRF

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch