Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

context parameters for db connections

hidy
is it possible to define DB connection settings in the metadata so that each table schema would have context.parm-type values in connection setting.
Example:
I have two connections, database_stage and database_DW.
Whenever i drag and drop a table schema to the job design (as input or output), I would love if the host, port etc. settings were populated with values such as context.DW_HOST, context.DW_PORT for the DW connection and context.STAGE_HOST and context.STAGE_PORT for the stage connection.
Is this possible?
Thanks in advance
Labels (2)
7 Replies
Anonymous
Not applicable
Author

create two context in context group, like stage and DW. and create same number and same name variables in each context, then assign different values to these variables. whenever you required to change connection just change the context.
Anonymous
Not applicable
Author

create two context in context group, like stage and DW. and create same number and same name variables in each context, then assign different values to these variables. whenever you required to change connection just change the context.

Thanks, this I believe is what I've done. Where / how do I place the variables so that I don't have to manually re-enter them into my new inputs / outputs?
Anonymous
Not applicable
Author

all the text fields are configurable so you can create a respective variables and put it in respective text boxes. like below.
0683p000009MDsg.png 0683p000009MDsl.png
Anonymous
Not applicable
Author

In your example, do you need to change the connection details to "client inventory details" whenever you create a new instance of the schema, or are the values prepopulated?
In the attached picture I'm trying to set the connection details as context parameters for a new database connection. I was wishing this way all the table schemas under that connection would automatically get the context parameters as connection information. It doesn't work though - contexts aren't allowed here apparently.
0683p000009MDnh.png
Anonymous
Not applicable
Author

Whenever i drag and drop a table schema to the job design (as input or output), I would love if the host, port etc. settings were populated with values such as context.DW_HOST, context.DW_PORT for the DW connection and context.STAGE_HOST and context.STAGE_PORT for the stage connection.
Is this possible?
Thanks in advance

Yes, the db connection parameters are set as context variables. see my screenshots.
Shong
0683p000009MDsq.png
Anonymous
Not applicable
Author

Whenever i drag and drop a table schema to the job design (as input or output), I would love if the host, port etc. settings were populated with values such as context.DW_HOST, context.DW_PORT for the DW connection and context.STAGE_HOST and context.STAGE_PORT for the stage connection.
Is this possible?
Thanks in advance

Yes, the db connection parameters are set as context variables. see my screenshots.
Shong
That looks exactly like what I'm looking for.
Where did you specify the database connection to use those context variables for all its' schema?
I'm assuming you did not modify the parameters only for "person" input, but on more generic level so that if you were to include another input or output from the same DB connection, you're get the same connection values there, too?
Thanks
Anonymous
Not applicable
Author

Hi drmartin
Not sure I understand you well, you need to retrieve the table schema first under DB connection in repository, then drag and drop the table schema from repository to job design, select the input/output component, all the db connection parameters are there with repository type, you don't need to set them manually.
Shong