Using context variables in metadata

One Star

Using context variables in metadata

I am used to define database connections and files as metadata so I can reuse them in different components. I've seen that I can use the context variables in database components if I define them as 'Built-In', but I haven't found the way of doing the same in the metadata. For example, I would like to define the database parameters (host, user, password, port) as context parameters in the metadata. Is this possible?
One Star

Re: Using context variables in metadata

ABSOLUTELY. I do it all the time.

Just put the names of your context variables in the component. Just do a search for "context variables" here on the forum and read up. Somewhere in there, I did a pretty good answer on how to work with context variables. Lots of illustrations.
One Star

Re: Using context variables in metadata

Thanks, SMaz, for your response. I've found the post you were speaking about: https://community.talend.com/t5/Design-and-Development/tDBInput-and-ODBC/m-p/74377. That post clearly explains how to define context variables, how to define context groups in the repository, how to import data from a repository context and how to use context variables in a specific component. This is well explained and I will do it this way if there is not another way.

But what I wanted to do is to use the context variables in a database definition in the repository. That is, I want to know if it's possible to use context variables when defining repository objects (database, xml files...).

Thanks.
One Star

Re: Using context variables in metadata

Unfortunately, I don't believe it is.

I think what you're likely striving for is described in this Suggestion

http://talendforge.org/forum/viewtopic.php?id=2342

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

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch