Import large datasets efficiently from Amazon S3, Google Cloud Storage, or Azure Blob Storage into Pinecone serverless indexes using object storage.
Importing from object storage is the most efficient and cost-effective way to load large numbers of records into an index.To run through this guide in your browser, see the Bulk import colab notebook.
Before you can import records, ensure you have a serverless index, a storage integration, and data formatted in a Parquet file and uploaded to an Amazon S3 bucket, Google Cloud Storage bucket, or Azure Blob Storage container.
To import records from a public data source, a storage integration is not required. However, to import records from a secure data source, you must create an integration to allow Pinecone access to data in your object storage. See the following guides:
In your Amazon S3 bucket, Google Cloud Storage bucket, or Azure Blob Storage container, create an import directory containing a subdirectory for each namespace you want to import into. The namespaces must not yet exist in your index.For example, to import data into the namespaces example_namespace1 and example_namespace2, your directory structure would look like this:
To import into the default namespace, use a subdirectory called __default__. The default namespace must be empty.
For each namespace, create one or more Parquet files defining the records to import.Parquet files must contain specific columns, depending on the index type:
Index of dense vectors
Index of sparse vectors
Index with both dense and sparse vectors
To import into a namespace in an index of dense vectors, the Parquet file must contain the following columns:
Upload the Parquet files into the relevant subdirectory.For example, if you have subdirectories for the namespaces example_namespace1 and example_namespace2 and upload 4 Parquet files into each, your directory structure would look as follows after the upload:
Bulk import is supported only for indexes without a schema definition. It is not supported for indexes with schemas, including full-text search indexes with document schemas and semantic-text-only integrated embedding indexes. To load data into an index with a document schema, use the documents upsert API instead.
Use the start_import operation to start an asynchronous import of vectors from object storage into an index.
For uri, specify the URI of the bucket and import directory containing the namespaces and Parquet files you want to import. For example:
For integration_id, specify the Integration ID of the Amazon S3, Google Cloud Storage, or Azure Blob Storage integration you created. The ID is found on the Storage integrations page of the Pinecone console.
An Integration ID is not needed to import from a public bucket.
For error_mode, use continue or abort.
With abort, the operation stops if any records fail to import.
With continue, the operation continues on error, but there is not any notification about which records, if any, failed to import. To see how many records were successfully imported, use the describe an import operation.
from pinecone import Pinecone, ImportErrorModepc = Pinecone(api_key="YOUR_API_KEY")# To get the unique host for an index, # see https://docs.pinecone.io/guides/manage-data/target-an-indexindex = pc.Index(host="INDEX_HOST")root = "s3://example_bucket/import"index.start_import( uri=root, integration_id="a12b3d4c-47d2-492c-a97a-dd98c8dbefde", # Optional for public buckets error_mode=ImportErrorMode.CONTINUE # or ImportErrorMode.ABORT)
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });// To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-indexconst index = pc.index("INDEX_NAME", "INDEX_HOST")const storageURI = 's3://example_bucket/import';const errorMode = 'continue'; // or 'abort'const integrationID = 'a12b3d4c-47d2-492c-a97a-dd98c8dbefde'; // Optional for public bucketsawait index.startImport(storageURI, errorMode, integrationID);
import io.pinecone.clients.Pinecone;import io.pinecone.clients.AsyncIndex;import org.openapitools.db_data.client.ApiException;import org.openapitools.db_data.client.model.ImportErrorMode;import org.openapitools.db_data.client.model.StartImportResponse;public class StartImport { public static void main(String[] args) throws ApiException { // Initialize a Pinecone client with your API key Pinecone pinecone = new Pinecone.Builder("YOUR_API_KEY").build(); // Get async imports connection object AsyncIndex asyncIndex = pinecone.getAsyncIndexConnection("docs-example"); // s3 uri String uri = "s3://example_bucket/import"; // Integration ID (optional for public buckets) String integrationId = "a12b3d4c-47d2-492c-a97a-dd98c8dbefde"; // Start an import StartImportResponse response = asyncIndex.startImport(uri, integrationId, ImportErrorMode.OnErrorEnum.CONTINUE); }}
package mainimport ( "context" "fmt" "log" "github.com/pinecone-io/go-pinecone/v4/pinecone")func main() { ctx := context.Background() pc, err := pinecone.NewClient(pinecone.NewClientParams{ ApiKey: "YOUR_API_KEY", }) if err != nil { log.Fatalf("Failed to create Client: %v", err) } // To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-index idxConnection, err := pc.Index(pinecone.NewIndexConnParams{Host: "INDEX_HOST"}) if err != nil { log.Fatalf("Failed to create IndexConnection for Host: %v", err) } uri := "s3://example_bucket/import" errorMode := "continue" // or "abort" importRes, err := idxConnection.StartImport(ctx, uri, nil, (*pinecone.ImportErrorMode)(&errorMode)) if err != nil { log.Fatalf("Failed to start import: %v", err) } fmt.Printf("Import started with ID: %s", importRes.Id)}
# To get the unique host for an index,# see https://docs.pinecone.io/guides/manage-data/target-an-indexPINECONE_API_KEY="YOUR_API_KEY"INDEX_HOST="INDEX_HOST"curl "https://$INDEX_HOST/bulk/imports" \ -H 'Api-Key: $YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -H 'X-Pinecone-Api-Version: 2025-10' \ -d '{ "integrationId": "a12b3d4c-47d2-492c-a97a-dd98c8dbefde", "uri": "s3://example_bucket/import", "errorMode": { "onError": "continue" } }'
Once all the data is loaded, the index builder indexes the records, which usually takes at least 10 minutes. During this indexing process, the expected job status is InProgress, but 100.0 percent complete. Once all the imported records are indexed and fully available for querying, the import operation is set to Completed. If you cancel the import before it finishes, the status changes to Cancelled.
You can start a new import using the Pinecone console. Find the index you want to import into, and click the ellipsis (…) menu > Import data.
The amount of time required for an import depends on various factors, including:
The number of records to import
The number of namespaces to import, and the the number of records in each
The total size (in bytes) of the import
To track an import’s progress, check its status bar in the Pinecone console or use the describe_import operation with the import ID:
from pinecone import Pineconepc = Pinecone(api_key="YOUR_API_KEY")# To get the unique host for an index, # see https://docs.pinecone.io/guides/manage-data/target-an-indexindex = pc.Index(host="INDEX_HOST")index.describe_import(id="101")
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });// To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-indexconst index = pc.index("INDEX_NAME", "INDEX_HOST")const results = await index.describeImport(id='101');console.log(results);
import io.pinecone.clients.Pinecone;import io.pinecone.clients.AsyncIndex;import org.openapitools.db_data.client.ApiException;import org.openapitools.db_data.client.model.ImportModel;public class DescribeImport { public static void main(String[] args) throws ApiException { // Initialize a Pinecone client with your API key Pinecone pinecone = new Pinecone.Builder("YOUR_API_KEY").build(); // Get async imports connection object AsyncIndex asyncIndex = pinecone.getAsyncIndexConnection("docs-example"); // Describe import ImportModel importDetails = asyncIndex.describeImport("101"); System.out.println(importDetails); }}
package mainimport ( "context" "fmt" "log" "github.com/pinecone-io/go-pinecone/v4/pinecone")func main() { ctx := context.Background() pc, err := pinecone.NewClient(pinecone.NewClientParams{ ApiKey: "YOUR_API_KEY", }) if err != nil { log.Fatalf("Failed to create Client: %v", err) } // To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-index idxConnection, err := pc.Index(pinecone.NewIndexConnParams{Host: "INDEX_HOST"}) if err != nil { log.Fatalf("Failed to create IndexConnection for Host: %v", err) } importID := "101" importDesc, err := idxConnection.DescribeImport(ctx, importID) if err != nil { log.Fatalf("Failed to describe import: %s - %v", importID, err) } fmt.Printf("Import ID: %s, Status: %s", importDesc.Id, importDesc.Status)}
# To get the unique host for an index, # see https://docs.pinecone.io/guides/manage-data/target-an-indexPINECONE_API_KEY="YOUR_API_KEY"INDEX_HOST="INDEX_HOST"curl -X GET "https://{INDEX_HOST}/bulk/imports/101" \ -H 'Api-Key: $YOUR_API_KEY' \ -H 'X-Pinecone-Api-Version: 2025-10'
The response contains the import details, including the import status, percent_complete, and records_imported:
Use the list_imports operation to list all of the recent and ongoing imports. By default, the operation returns up to 100 imports per page. If the limit parameter is passed, the operation returns up to that number of imports per page instead. For example, if limit=3, up to 3 imports are returned per page. Whenever there are additional imports to return, the response includes a pagination_token for fetching the next page of imports.
Python SDK
Other SDKs
When using the Python SDK, list_import paginates automatically.
Python
from pinecone import Pinecone, ImportErrorModepc = Pinecone(api_key="YOUR_API_KEY")# To get the unique host for an index, # see https://docs.pinecone.io/guides/manage-data/target-an-indexindex = pc.Index(host="INDEX_HOST")# List using a generator that handles paginationfor i in index.list_imports(): print(f"id: {i.id} status: {i.status}")# List using a generator that fetches all results at onceoperations = list(index.list_imports())print(operations)
You can view the list of imports for an index in the Pinecone console. Select the index and navigate to the Imports tab.
When using the Node.js SDK, Java SDK, Go SDK, or REST API to list recent and ongoing imports, you must manually fetch each page of results. To view the next page of results, include the paginationToken provided in the response.
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });// To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-indexconst index = pc.index("INDEX_NAME", "INDEX_HOST")const results = await index.listImports({ limit: 10, paginationToken: 'Tm90aGluZyB0byBzZWUgaGVyZQo' });console.log(results);
import io.pinecone.clients.Pinecone;import io.pinecone.clients.AsyncIndex;import org.openapitools.db_data.client.ApiException;import org.openapitools.db_data.client.model.ListImportsResponse;public class ListImports { public static void main(String[] args) throws ApiException { // Initialize a Pinecone client with your API key Pinecone pinecone = new Pinecone.Builder("YOUR_API_KEY").build(); // Get async imports connection object AsyncIndex asyncIndex = pinecone.getAsyncIndexConnection("docs-example"); // List imports ListImportsResponse response = asyncIndex.listImports(10, "Tm90aGluZyB0byBzZWUgaGVyZQo"); System.out.println(response); }}
package mainimport ( "context" "fmt" "log" "github.com/pinecone-io/go-pinecone/v4/pinecone")func main() { ctx := context.Background() pc, err := pinecone.NewClient(pinecone.NewClientParams{ ApiKey: "YOUR_API_KEY", }) if err != nil { log.Fatalf("Failed to create Client: %v", err) } // To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-index idxConnection, err := pc.Index(pinecone.NewIndexConnParams{Host: "INDEX_HOST"}) if err != nil { log.Fatalf("Failed to create IndexConnection for Host: %v", err) } limit := int32(10) firstImportPage, err := idxConnection.ListImports(ctx, &limit, nil) if err != nil { log.Fatalf("Failed to list imports: %v", err) } fmt.Printf("First page of imports: %+v", firstImportPage.Imports) paginationToken := firstImportPage.NextPaginationToken nextImportPage, err := idxConnection.ListImports(ctx, &limit, paginationToken) if err != nil { log.Fatalf("Failed to list imports: %v", err) } fmt.Printf("Second page of imports: %+v", nextImportPage.Imports)}
# To get the unique host for an index,# see https://docs.pinecone.io/guides/manage-data/target-an-indexPINECONE_API_KEY="YOUR_API_KEY"INDEX_HOST="INDEX_HOST"curl -X GET "https://$INDEX_HOST/bulk/imports?paginationToken==Tm90aGluZyB0byBzZWUgaGVyZQo" \ -H 'Api-Key: $YOUR_API_KEY' \ -H 'X-Pinecone-Api-Version: 2025-10'
The cancel_import operation cancels an import if it is not yet finished. It has no effect if the import is already complete.
from pinecone import Pineconepc = Pinecone(api_key="YOUR_API_KEY")# To get the unique host for an index, # see https://docs.pinecone.io/guides/manage-data/target-an-indexindex = pc.Index(host="INDEX_HOST")index.cancel_import(id="101")
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });// To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-indexconst index = pc.index("INDEX_NAME", "INDEX_HOST")await index.cancelImport(id='101');
import io.pinecone.clients.Pinecone;import io.pinecone.clients.AsyncIndex;import org.openapitools.db_data.client.ApiException;public class CancelImport { public static void main(String[] args) throws ApiException { // Initialize a Pinecone client with your API key Pinecone pinecone = new Pinecone.Builder("YOUR_API_KEY").build(); // Get async imports connection object AsyncIndex asyncIndex = pinecone.getAsyncIndexConnection("docs-example"); // Cancel import asyncIndex.cancelImport("2"); }}
package mainimport ( "context" "fmt" "log" "github.com/pinecone-io/go-pinecone/v4/pinecone")func main() { ctx := context.Background() pc, err := pinecone.NewClient(pinecone.NewClientParams{ ApiKey: "YOUR_API_KEY", }) if err != nil { log.Fatalf("Failed to create Client: %v", err) } // To get the unique host for an index, // see https://docs.pinecone.io/guides/manage-data/target-an-index idxConnection, err := pc.Index(pinecone.NewIndexConnParams{Host: "INDEX_HOST"}) if err != nil { log.Fatalf("Failed to create IndexConnection for Host: %v", err) } importID := "101" err = idxConnection.CancelImport(ctx, importID) if err != nil { log.Fatalf("Failed to cancel import: %s", importID) } importDesc, err := idxConnection.DescribeImport(ctx, importID) if err != nil { log.Fatalf("Failed to describe import: %s - %v", importID, err) }}
# To get the unique host for an index,# see https://docs.pinecone.io/guides/manage-data/target-an-indexPINECONE_API_KEY="YOUR_API_KEY"INDEX_HOST="INDEX_HOST"curl -X DELETE "https://{INDEX_HOST}/bulk/imports/101" \ -H 'Api-Key: $YOUR_API_KEY' \ -H "X-Pinecone-Api-Version: 2025-10"
Response
{}
You can cancel your import using the Pinecone console. To cancel an ongoing import, select the index you are importing into and navigate to the Imports tab. Then, click the ellipsis (…) menu > Cancel.
If your import exceeds these limits, you’ll get an error specifying the limit exceeded. See Troubleshooting for details.
Metric
Limit
Max namespaces per import
10,000
Max total input data size (on-demand indexes)
1 TB
Max total input data size (DRN indexes)
Unlimited
Max files per import
100,000
Max size per file
10 GB
The total input data size limit does not apply to indexes with dedicated read nodes.Bulk import is supported only for indexes without a schema definition. It is not supported for indexes with schemas, including full-text search indexes with document schemas and semantic-text-only integrated embedding indexes.Also:
You cannot import data from an AWS S3 bucket into a Pinecone index hosted on GCP or Azure.
You cannot import data from S3 Express One Zone storage.
You cannot import data into an existing namespace.
When importing data into the __default__ namespace of an index, the default namespace must be empty.
Each import takes at least 10 minutes to complete.
When an import fails, you’ll see an error message with the reason for the failure in the Pinecone console or in the response to the describe an import operation.
Namespace already exists
You cannot import data into an existing namespace. If your import directory structure contains a folder with the name of an existing namespace in your index, the import will fail with the following error:
User error: The namespace "example-namespace" already exists. Imports are only allowed into nonexistent namespaces.
To fix this, rename the folder to use a namespace name that does not yet exist.
No namespace found
In object storage, your directory structure must be as follows:
If a Parquet file is not nested under a namespace subdirectory, the import will fail with the following error:
User error: \"test-import/0.parquet\": No namespace detected. Each file should be nested under a subdirectory of the URI prefix. This indicates which namespace it should be imported into.
To fix this, move the Parquet file to a namespace subdirectory.
Parquet files not found
Each namespace subdirectory must contain Parquet files with data to import. If a namespace subdirectory does not include Parquet files, the import will fail with the following error:
User error: No Parquet files found under \"gs://example_bucket/imports\". Files must be stored with the specified bucket prefix.
To fix this, add Parquet files to the namespace subdirectory.
Invalid import URI
In your start import request, the import uri must specify only the bucket and import directory containing the namespaces and Parquet files you want to import. If the uri also contains a namespaces directory or a Parquet filename, the import will fail with the following error:
User error: \"test-import/0.parquet\": It looks like you specified a complete path to a parquet file as the URI prefix to import from. Note that the URI prefix should give an ancestor directory with subdirectories to specify each namespace to import into. See https://docs.pinecone.io/guides/data/understanding-imports#directory-structure.
To fix this, remove the namespaces directory or Parquet filename from the uri.
Invalid Parquet files
When a Parquet file is not formatted correctly, the import will fail with a message like one of the following:
Parquet footer could not be parsed. Are you sure this is valid parquet?
Type errors
The expected data type for column \"{column}\" is \"{expected}\", but got \"{given}\"The expected data type for metadata is a JSON encoded string in UTF-8 format, but got \"{given}\"
These errors are returned for both continue and abort error modes.To fix these errors, check the specific error message and follow the instructions in the Prepare your data section.
Invalid records
When the error_mode is abort and a file contains invalid records, the import will stop processing on the first invalid record and return an error message identifying the file name and row:
User error: error reading record (file \"/0.parquet\", row 0):
This will be followed by an error message identifying the specific issue. For example:
Missing values
missing required values in column \"{column}\"
Invalid metadata
Failed to parse metadata: {msg}
Invalid vectors
Upserting dense vectors is not supported for indexes that store only sparse vectors
When the error_mode is continue, the import will skip individual invalid records. However, if all records are invalid and skipped (for example, the vector type in the file does not match the vector type of the index), the import will fail with a general message:
User error: No vectors added, all rows were skipped for namespace: example-namespace
To fix these errors, check the specific error message and follow the instructions in the Prepare your data section.
Duplicate records
When your import contains duplicate vectors (records with identical vector values), the duplicates are marked as skipped and not imported. Only one occurrence of each unique vector is added to the index.This applies to both continue and abort error modes:
With abort: The import fails when it encounters a duplicate vector within the import.
With continue: The import proceeds, skipping duplicate records silently.
Example scenario:
If your Parquet file contains:
id | values---|---------1 | [0.1, 0.2, 0.3]2 | [0.1, 0.2, 0.3] ← Duplicate of record 1, will be skipped3 | [0.4, 0.5, 0.6]
Only records 1 and 3 will be imported.To prevent this from happening, deduplicate your source data before creating Parquet files by removing records with identical vector values.
Import exceeds maximum data size for on-demand
On-demand indexes have a maximum total input data size of 1 TB per import. If your import exceeds this limit, it will fail with the following error:
Import ({size} GB) exceeds the maximum input data size of 1000 GB for on-demand. Consider using Dedicated Read Nodes (DRN) for larger index sizes, or contact support for your use-case.
To fix this, either reduce the total size of your import to under 1 TB, use an index with dedicated read nodes (which have no total data size limit for imports), or contact support.