class_docstr: Interact with Pinecone. This hook uses the Pinecone conn_id.
  
  :param conn_id: Optional, default connection id is `pinecone_default`. The connection id to use when
      connecting to Pinecone.
class_docstr_tok: ["Interact","with","Pinecone",".","This","hook","uses","the","Pinecone","conn_id",".",":","param","conn_id",":","Optional",",","default","connection","id","is","`","pinecone_default","`",".","The","connection","id","to","use","when","connecting","to","Pinecone","."]
docstr: The upsert operation writes vectors into a namespace.
  
  If a new value is upserted for an existing vector id, it will overwrite the previous value.
  
   .. seealso:: https://docs.pinecone.io/reference/upsert
  
  To upsert in parallel follow
  
  .. seealso:: https://docs.pinecone.io/docs/insert-data#sending-upserts-in-parallel
  
  :param index_name: The name of the index to describe.
  :param vectors: A list of vectors to upsert.
  :param namespace: The namespace to write to. If not specified, the default namespace - "" is used.
  :param batch_size: The number of vectors to upsert in each batch.
  :param show_progress: Whether to show a progress bar using tqdm. Applied only
      if batch_size is provided.
docstr_tok: ["The","upsert","operation","writes","vectors","into","a","namespace",".","If","a","new","value","is","upserted","for","an","existing","vector","id",",","it","will","overwrite","the","previous","value",".","..","seealso",":",":","https",":","\/\/docs.pinecone.io\/reference\/upsert","To","upsert","in","parallel","follow","..","seealso",":",":","https",":","\/\/docs.pinecone.io\/docs\/insert-data","#","sending-upserts-in-parallel",":","param","index_name",":","The","name","of","the","index","to","describe",".",":","param","vectors",":","A","list","of","vectors","to","upsert",".",":","param","namespace",":","The","namespace","to","write","to",".","If","not","specified",",","the","default","namespace","-","``","''","is","used",".",":","param","batch_size",":","The","number","of","vectors","to","upsert","in","each","batch",".",":","param","show_progress",":","Whether","to","show","a","progress","bar","using","tqdm",".","Applied","only","if","batch_size","is","provided","."]
code: def upsert(
      index_name: str,
      vectors: list[Any],
      namespace: str = "",
      batch_size: int | None = None,
      show_progress: bool = True,
      **kwargs: Any,
  ) -> UpsertResponse:
      """
      The upsert operation writes vectors into a namespace.
  
      If a new value is upserted for an existing vector id, it will overwrite the previous value.
  
       .. seealso:: https://docs.pinecone.io/reference/upsert
  
      To upsert in parallel follow
  
      .. seealso:: https://docs.pinecone.io/docs/insert-data#sending-upserts-in-parallel
  
      :param index_name: The name of the index to describe.
      :param vectors: A list of vectors to upsert.
      :param namespace: The namespace to write to. If not specified, the default namespace - "" is used.
      :param batch_size: The number of vectors to upsert in each batch.
      :param show_progress: Whether to show a progress bar using tqdm. Applied only
          if batch_size is provided.
      """
      index = pinecone.Index(index_name)
      return index.upsert(
          vectors=vectors,
          namespace=namespace,
          batch_size=batch_size,
          show_progress=show_progress,
          **kwargs,
      )
  
imports: from __future__ import annotations
  import itertools
  from typing import TYPE_CHECKING, Any
  import pinecone
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 7 for calling the PineconeHook obj's underlying member method code with example usage: obj.upsert(index_name, vectors, namespace, batch_size, show_progress) and returns: index