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: Upserts (insert/update) data into the Pinecone index.
  
  :param index_name: Name of the index.
  :param data: List of tuples to be upserted. Each tuple is of form (id, vector, metadata).
               Metadata is optional.
  :param async_req: If True, upsert operations will be asynchronous.
  :param pool_threads: Number of threads for parallel upserting. If async_req is True, this must be provided.
docstr_tok: ["Upserts","(","insert\/update",")","data","into","the","Pinecone","index",".",":","param","index_name",":","Name","of","the","index",".",":","param","data",":","List","of","tuples","to","be","upserted",".","Each","tuple","is","of","form","(","id",",","vector",",","metadata",")",".","Metadata","is","optional",".",":","param","async_req",":","If","True",",","upsert","operations","will","be","asynchronous",".",":","param","pool_threads",":","Number","of","threads","for","parallel","upserting",".","If","async_req","is","True",",","this","must","be","provided","."]
code: def upsert_data_async(
      self,
      index_name: str,
      data: list[tuple[Any]],
      async_req: bool = False,
      pool_threads: int | None = None,
  ) -> None | list[Any]:
      """
      Upserts (insert/update) data into the Pinecone index.
  
      :param index_name: Name of the index.
      :param data: List of tuples to be upserted. Each tuple is of form (id, vector, metadata).
                   Metadata is optional.
      :param async_req: If True, upsert operations will be asynchronous.
      :param pool_threads: Number of threads for parallel upserting. If async_req is True, this must be provided.
      """
      responses = []
      with pinecone.Index(
          index_name, pool_threads=pool_threads
      ) as index:
          if async_req and pool_threads:
              async_results = [
                  index.upsert(vectors=chunk, async_req=True)
                  for chunk in self._chunks(data)
              ]
              responses = [
                  async_result.get() for async_result in async_results
              ]
          else:
              for chunk in self._chunks(data):
                  response = index.upsert(vectors=chunk)
                  responses.append(response)
      return responses
  
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 18 for calling the PineconeHook obj's underlying member method code with example usage: obj.upsert_data_async(index_name, data, async_req, pool_threads) and returns: responses