Check out the first Dataiku 8 Deep Dive focusing on Productivity on October 29th Read More

API node connection not found

Level 4
API node connection not found

Hi,

 trying to use an SQL query API endpoint to query some data via SQL connection. The endpoint works fine in development mode, because the SQL connection imp is configured in Administration -> Settings -> API Designer & Deployer in section "Connection for bundled data" 

capture.PNG

But: I cant make it working on API node(s), the API node is complaining that it cant find this connection.

"in service:provide_data: in gen:v1: Connection 'imp' does not exist".

According to the documentation the API Deployer pools and handles the connection(s) and in this case my DSS design the the API Deployer where the connection exists.

Am I missing something from the API Deployer setup? Thanks

2 Replies
Dataiker
Dataiker

Hi,

The API deployer does not automatically setup connections on static API nodes. It can help doing it for K8S API nodes only.

For static API nodes, you need to edit the config/server.json file to add the connection details, as per https://doc.dataiku.com/dss/latest/apinode/enrich-prediction-queries.html#api-node-configuration

For K8S-controlled API nodes, you need to fill the settings in Infrastructure > Settings > Connections

Level 4
Author

Great, problem sovled!

 

Just for others having this kind of issue:

If you are using SQL query endpoint, the connection must be inserted into a remapped connections, like this:

"remappedConnections":
{
"imp": <- NAME OF THE CONNECTION coming from DSS Design
{
"type": "JDBC",
"params":
{
"driver": "com.cloudera.impala.jdbc41.Driver",
"jdbcurl": "...",
"namingRule":
{
"tableNameDatasetNamePrefix": "${projectKey}_",
"canOverrideSchemaInManagedDatasetCreation": false
},
"useTruncate": false,
"autocommitMode": false,
"properties": [],
"dkuProperties": []
}
}
},

And also dont forget to put the correct JDBC drivers into API node's lib/jdbc path.