API node connection not found

Options
tomas
tomas Registered, Neuron 2022 Posts: 120 ✭✭✭✭✭

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

Best Answer

Answers

  • tomas
    tomas Registered, Neuron 2022 Posts: 120 ✭✭✭✭✭
    edited July 17
    Options

    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.

Setup Info
    Tags
      Help me…