remapping connections for API services
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
Best Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron
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.
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron
Yes. So the remapping happens by the connection name which in the API node can point to a different database instance.
Answers
-
fjavanderspek Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 8 ✭✭
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> }, }, "..." }
-
fjavanderspek Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 8 ✭✭
Thanks!