How to don't return fields - QuestDB

Hello community!

Just a little question, is there a possibility to not return fields when execute an INSERT query into the node QuestDB?
Since yesterday, I’ve seen my workflow in error due to timeout (after 5min): Error: Connection terminated unexpectedly.
The argument “Return fields” is set to “*”. If I launch the workflow manually, same error. If I set the “Return fields” to one column, the workflow works perfectly.

I don’t know if it’s a bug, or a limitation of the return in n8n (since the return is currently 95xx lines with 8 colums).

Thanks :slight_smile:

Sorry but there is currently no way of doing it with the “Insert” option.

You can however do that with the “Execute Query” option. It allows to execute any kind of query, so also an INSERT.

Here an example (uses Postgres, as I have that running already locally, but the nodes are almost totally identical so should work the same with QuestDB):

{
  "nodes": [
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO product (id, name, timestamp) VALUES($1, $2, $3);",
        "additionalFields": {
          "queryParams": "id,name,timestamp"
        }
      },
      "name": "Postgres12",
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 1,
      "position": [
        850,
        -200
      ],
      "executeOnce": true,
      "credentials": {
        "postgres": "localhost - postgres"
      }
    },
    {
      "parameters": {
        "functionCode": "return [\n  {\n    json: {\n      id: 8001,\n      name: 'name1',\n      timestamp: '2021-05-01'\n    }\n  },\n  {\n    json: {\n      id: 8002,\n      name: 'name2',\n      timestamp: '2021-05-02'\n    }\n  }\n];"
      },
      "name": "Function1",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        650,
        -200
      ]
    }
  ],
  "connections": {
    "Function1": {
      "main": [
        [
          {
            "node": "Postgres12",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

This is what I thought.
I will do a manual query so. Thanks @jan!

1 Like