airflow.providers.pinecone.operators.pinecone

Module Contents

Classes

PineconeIngestOperator

Ingest vector embeddings into Pinecone.

class airflow.providers.pinecone.operators.pinecone.PineconeIngestOperator(*, conn_id=PineconeHook.default_conn_name, index_name, input_vectors, namespace='', batch_size=None, upsert_kwargs=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Ingest vector embeddings into Pinecone.

See also

For more information on how to use this operator, take a look at the guide: PineconeIngestOperator

Parameters
  • conn_id (str) – The connection id to use when connecting to Pinecone.

  • index_name (str) – Name of the Pinecone index.

  • input_vectors (list[tuple]) – Data to be ingested, in the form of a list of tuples where each tuple contains (id, vector_embedding, metadata).

  • namespace (str) – The namespace to write to. If not specified, the default namespace is used.

  • batch_size (int | None) – The number of vectors to upsert in each batch.

  • upsert_kwargs (dict | None) –

template_fields: Sequence[str] = ('index_name', 'input_vectors', 'namespace')[source]
hook()[source]

Return an instance of the PineconeHook.

execute(context)[source]

Ingest data into Pinecone using the PineconeHook.

Was this entry helpful?