Pinecone
Pinecone is a closed source vector database with "classic" and "serverless" collection types. Classic collections do not support iterating over all records in a collection. For that reason, vec2pg
exclusively supports migrating from their more recent "serverless" collections.
1 |
|
1 2 3 4 5 6 7 8 9 10 11 |
|
To migrate from Pinecone serverless index to Postgres you'll need:
- A Pinecone API Key
- The Pinecone serverless index name
- A Supabase instance
From the Supabase instance, we need the connection parameters. Retrieve them on the database settings page
And substitute those values into a valid Postgres connection string
1 |
|
1 |
|
Then we can call vec2pg pinecone migrate
passing our values. You can supply all parameters directly to the CLI, but its a good idea to pass the Pinecone API Key PINECONE_API_KEY
and Supabase connection string POSTGRES_CONNECTION_STRING
as environment variables to avoid logging credentials to your shell's history.
The CLI provies a progress bar to monitor the migration.
On completion, you can view a copy of the Pinecone index data in Supabase Postgres at vec2pg.<pinecone index name>
From there you can transform and manipulate the data in Postgres using SQL.