Bigquery Node Insert Query Error but data is inserted


I am trying to run an insert query using a Bigquery node with query execution operation.
This fails with the error

ERROR: Not found: ['bigquery_project_id"]:job_id

NodeOperationError: Not found: Job *************:job_yrVGXd93qW1rrW6ZLHa6eljXdbtN
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/BigQuery/v2/actions/database/executeQuery.operation.js:237:23)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/BigQuery/v2/actions/router.js:39:26)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:631:53

However the data is inserted correctly. The same happens with DELETE queries where I get an error but the rows are deleted.

I have successfully used queries to replace or create tables with this node. Could it be a node bug regarding these operations?

  • n8n version:1.8.2
  • Running n8n via n8n cloud:

I copied the BQ node from the other workflow that works and replaced the query with the INSERT query that was failing and it works. Could it be that the BQ Nodes have been updated and include some bug?The node that works was added in version 1.6.1 if I am not wrong.

I came to this idea because in the newly added BQ node simple SELECT queries were also failing.

Hi @xristos, I am very sorry for the trouble.

It’s been quite a while since the BigQuery node was touched, but it certainly sounds like you might be using different node versions. You can verify this by copying a node and pasting it into a text editor. You should then see a line saying "typeVersion" followed by the version of the node. The current version would be 2 and was introduced in April with n8n 0.226. Perhaps you can confirm if the working node has a different version than your non-working node?

Could you also share the simplest possible workflow using which your problem can be reproduced? You can of course redact any confidential values, it’d just be important to keep the actual data itself.

Hi, I am encountering the same problem as well.
The node runs the SQL query.
In this case the table is created but the workflow show error.
I can’t integrate this in a bigger workflow so a bug fix will help greatly.

The node version is 2

Thanks so much for confirming and for sharing these details @Herman_Tan!

I can reproduce the problem and will add this to our engineering backlog for a closer look and fix.

@MutedJam @Herman_Tan the working node type version is also 2 but I noticed that I had explicitly set the location in options. So try using in the option Location (Region) to set where the query will run

Ah yes, I was setting my region and project rather than the one used by @Herman_Tan above, and was able to see the issue you have reported (which I previously not with my existing nodes), whereas the same query executed through the BQ console is working fine.

We will of course update this thread once a fix is available.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.