Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

remapping connections for API services

Solved!
fjavanderspek
Level 2
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

0 Kudos
2 Solutions
Turribeach

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.

View solution in original post

0 Kudos

Yes. So the remapping happens by the connection name which in the API node can point to a different database instance. 

View solution in original post

4 Replies
Turribeach

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.

0 Kudos
fjavanderspek
Level 2
Author

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> },
        },
        "..."
}

 

0 Kudos

Yes. So the remapping happens by the connection name which in the API node can point to a different database instance. 

fjavanderspek
Level 2
Author

Thanks!

0 Kudos

Labels

?

Setup info

?
A banner prompting to get Dataiku