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?
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.
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...).