Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on May 28, 2024 11:40AM
Likes: 0
Replies: 4
Goodday!
In the API Designer, we can define connections to use with SQL Query Endpoints. How do we remap these connections based on deployments to different API nodes? (ie. use different connection for deployments to a production API node vs. deployments to an acceptance API node) I don't see any option in the deployer UI and am wondering what the intended method is!
Kind regards
See this documentation page:
https://doc.dataiku.com/dss/latest/apinode/enrich-prediction-queries.html#referenced-data
You have to define the connections in DATA_DIR/config/server.json in the API Node.
Yes. So the remapping happens by the connection name which in the API node can point to a different database instance.
To verify my understanding, does that mean, in the following JSON block, the 'MY-SAMPLE-CONNECTION' should have the connection name of the connection that was used on the Design Node and the type & params should be filled with values of the database to which we want to remap?:
{ "remappedConnections": { "MY-SAMPLE-CONNECTION": { "type": "PostgreSQL", "params": { "host": "my-db-host", "db": "my-db", "user": "my-user", "password": "my-password" } }, "MY-OTHER-CONNECTION": { "..." } }, "..." }
So, in essence:
{ "remappedConnections": { "<DEV-DATABASE-CONNECTION-NAME>": { <PROD DATABASE CONNECTION DETAILS> }, }, "..." }
Thanks!