Skip to main content
Use the LambdaDB Migration CLI to migrate Pinecone Serverless indexes into LambdaDB. The CLI inventories your Pinecone index, generates an editable LambdaDB mapping, creates the target LambdaDB collection when needed, lists and fetches Pinecone records, writes LambdaDB documents, saves local checkpoints, and validates migrated records before cutover. Pinecone vector-API records contain an id, dense values and/or sparse_values, and optional metadata. Records live inside namespaces. LambdaDB stores each migrated record as a document: the Pinecone ID becomes the LambdaDB document id, metadata becomes document fields, and vector values become LambdaDB vector or sparseVector fields.

What the CLI supports

The Pinecone connector uses Pinecone’s vector listing API, which is available for Serverless indexes. Pod-based indexes and workloads that cannot list vector IDs should be moved to Pinecone Serverless first or migrated with a custom export path.
Pinecone’s newer document-schema indexes can mix dense_vector, sparse_vector, full-text string, and metadata fields. The current LambdaDB Migration CLI path is designed around Pinecone Serverless vector records that can be listed and fetched. Review document-schema and full-text workloads before using the default migration path.
Pinecone’s current API reference is versioned as 2026-04. If you call Pinecone REST APIs directly during a custom migration, set the X-Pinecone-Api-Version header explicitly. The LambdaDB Migration CLI uses Pinecone’s official SDK and does not require you to pass this header.

Step 1: Install the CLI

Install the latest release:
Install a specific version:
Check the Pinecone command:

Step 2: Set credentials

LambdaDB Cloud uses region-specific API base URLs. Use the base URL, project name, and project API key shown for your project in the LambdaDB Cloud console. Do not assume a global default URL or a fixed project name.
Set your Pinecone API key and LambdaDB connection values:
If you use a non-default Pinecone control-plane host, pass it with --pinecone.host.

Step 3: Generate inventory and mapping

Run the inventory command against a Pinecone Serverless index:
Use --pinecone.list-prefix when you only want to migrate records whose IDs start with a specific prefix:
A dense-vector inventory produces an editable mapping like this:
Review the generated mapping before running the migration. In particular:
  • Add payload.indexConfigs for metadata fields that must be searchable or sortable in LambdaDB.
  • Check dense vector dimensions and similarity.
  • Check normalized dotted metadata fields.
  • Decide whether one Pinecone namespace should become one LambdaDB collection, or whether you should run multiple scoped migrations.
For example, add indexes for metadata fields used by filters:
For a Pinecone sparse index, the generated mapping includes a sparse vector field:
Generated mappings set target.createCollection: true by default. With that setting, the migration creates the LambdaDB collection if it is missing and waits until it is ready before writing documents.

Step 4: Run a dry run

Use a dry run to validate the mapping and inspect the planned migration without writing documents:

Step 5: Run the migration

Run the migration with validation enabled:
Migration progress is written to stderr with accepted count, percent, batch size, rate, and elapsed time. The CLI stores checkpoints under .lambdadb-migration/checkpoints by default. If the command is interrupted, rerun the same command to resume. Use --migration.restart to ignore an existing checkpoint and start from the beginning. Use --migration.create-collection=false when the target LambdaDB collection already exists and the migration should not create it.

Step 6: Review validation

--migration.validate checks the accepted record count, fetches a sample of migrated documents from LambdaDB using strongly consistent reads, and compares sampled fields. --migration.validation-report writes the validation result as JSON. The report includes source count, accepted records, LambdaDB numDocs, sampled IDs, compared sample count, query overlap results, and validation errors. For dense or sparse-vector migrations, add query overlap checks:
By default, --migration.query-overlap reports vector overlap without failing the migration. Set --migration.query-overlap-min-ratio above 0 to require a minimum average overlap.

Mapping details

Use this metric mapping when creating LambdaDB vector fields: For a Pinecone dense record:
Pinecone record
the CLI writes a LambdaDB document like this:
LambdaDB document
For a Pinecone sparse record:
Pinecone sparse values
the CLI converts sparse values to an object whose keys are index strings:
LambdaDB document
A Pinecone dense-vector query:
Python
becomes a LambdaDB knn query:
Python
If you use LambdaDB managed embeddings instead of migrated vector values, send query text:
Python
A Pinecone sparse-vector query:
Python
becomes a LambdaDB sparse vector query:
Python
Pinecone vector-API hybrid search can use one index with both dense and sparse values, or separate dense and sparse indexes whose results are merged client-side. In LambdaDB, use a collection with both dense and sparse fields, then query those fields together:
LambdaDB dense + sparse hybrid query
Use rrf when you want rank fusion without explicit boosts, or mm/l2 when you want weighted score fusion.

Rewrite filters

Pinecone metadata filters use operators such as $eq, $gte, $in, $and, and $or. In LambdaDB, map simple exact and range filters to queryString, and use bool when you need multiple clauses.
Pinecone metadata filter
LambdaDB bool query
Use field types intentionally:

Common gotchas

  • Serverless only: Pinecone’s list endpoint is supported only for Serverless indexes. The CLI depends on vector listing, then fetches listed records by ID.
  • Namespaces: Run one migration per namespace. If the namespace itself matters in LambdaDB, use separate target collections or add namespace metadata in Pinecone before migration.
  • Metadata indexes: Pinecone metadata index settings are not introspected. Add LambdaDB payload.indexConfigs manually for fields used in filters or sorting.
  • Field names: LambdaDB field names cannot contain dots. Dotted Pinecone metadata keys are normalized during migration, such as metadata.url to metadata_url.
  • Integrated embeddings: Pinecone hosted model configuration is not migrated. The CLI migrates stored vector values. Use LambdaDB managed embeddings when you want LambdaDB to generate embeddings from source text after migration.
  • Hybrid shape: Pinecone supports multiple hybrid patterns. Validate whether your workload uses a single dense index with sparse_values, separate dense and sparse indexes, or a document-schema index before choosing the target LambdaDB schema.
  • Bulk writes: Regular upsert accepts request payloads up to 6 MB. Bulk upsert accepts up to 200 MB, but not for collections with managed embeddings.
  • Consistency: Pinecone is eventually consistent for freshly written data. LambdaDB uses eventual reads by default, but supports consistentRead for strong read-after-write checks. The CLI validation uses strongly consistent sample fetches; use query overlap checks before cutover.

Next steps

Migration CLI

Review the shared LambdaDB Migration CLI workflow.

Create a collection

Define LambdaDB index configurations for your migrated data.

Sparse vector query

Rewrite Pinecone sparse-vector searches as LambdaDB sparse vector queries.

Hybrid query

Combine lexical, dense vector, and sparse vector search.