Trying to update a csv file in pinecone

I am changing a value(product quantity ) in the csv and saving on a google drive.
I have the following

Google Drive Trigger node
Watch For File Update
Options File Type All
Google Drive node
File
Operation Download
File by ID
Options
Put Output File in Field = data

At this stage I see the csv file.

Pinecone Vector Store Operation Mode = update
ID = data

I presumed that I would see a content field with the data in there and pine code would update this.

{
  "errorMessage": "Single document per item expected",
  "errorDetails": {},
  "n8nDetails": {
    "nodeName": "Pinecone Vector Store",
    "nodeType": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
    "nodeVersion": 1,
    "time": "27/09/2024, 20:04:52",
    "n8nVersion": "1.59.0 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "NodeOperationError: Single document per item expected",
      "    at Object.execute (/opt/render/project/src/packages/@n8n/nodes-langchain/nodes/vector_store/shared/createVectorStoreNode.ts:353:13)",
      "    at Workflow.runNode (/opt/render/project/src/packages/workflow/src/Workflow.ts:1383:8)",
      "    at /opt/render/project/src/packages/core/src/WorkflowExecute.ts:1080:27",
      "    at /opt/render/project/src/packages/core/src/WorkflowExecute.ts:1800:11"
    ]
  }
}

Any help appreciated.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Steve_Warburton

The update operation in the Pinecone node needs to reference to an existing ID in the vector data base.

Example:

Unfortunately updating a vector database is not as straightforward as updating a row from a csv. Vector databases are more useful when working with unstructured data.

Since csv is a highly structured data format, you might be better off using a different structured database (e.g. google sheets, airtable, etc). You can then identify an UUID to update against matching records.

Alternatively, you can keep inserting (embedding) the new CSV file to include the new data. This however can lead to data duplication.

You might wanna check out this tutorial on Upserting Vector Stores: