class_docstr: Interact with Weaviate database to store vectors. This hook uses the 'conn_id'.
  
  :param conn_id: The connection id to use when connecting to Weaviate. <howto/connection:weaviate>
class_docstr_tok: ["Interact","with","Weaviate","database","to","store","vectors",".","This","hook","uses","the","'conn_id","'",".",":","param","conn_id",":","The","connection","id","to","use","when","connecting","to","Weaviate",".","<","howto\/connection",":","weaviate",">"]
docstr: Adds UUIDs to a DataFrame, useful for replace operations where UUIDs must be known before ingestion.
  
  By default, UUIDs are generated using a custom function if 'uuid_column' is not specified.
  The function can potentially ingest the same data multiple times with different UUIDs.
  
  :param df: A dataframe with data to generate a UUID from.
  :param class_name: The name of the class use as part of the uuid namespace.
  :param uuid_column: Name of the column to create. Default is 'id'.
  :param unique_columns: A list of columns to use for UUID generation. By default, all columns except
      vector_column will be used.
  :param vector_column: Name of the column containing the vector data.  If specified the vector will be
      removed prior to generating the uuid.
code: def _generate_uuids(
      self,
      df: pd.DataFrame,
      class_name: str,
      unique_columns: list[str],
      vector_column: str | None = None,
      uuid_column: str | None = None,
  ) -> tuple[pd.DataFrame, str]:
      """
      Adds UUIDs to a DataFrame, useful for replace operations where UUIDs must be known before ingestion.
  
      By default, UUIDs are generated using a custom function if 'uuid_column' is not specified.
      The function can potentially ingest the same data multiple times with different UUIDs.
  
      :param df: A dataframe with data to generate a UUID from.
      :param class_name: The name of the class use as part of the uuid namespace.
      :param uuid_column: Name of the column to create. Default is 'id'.
      :param unique_columns: A list of columns to use for UUID generation. By default, all columns except
          vector_column will be used.
      :param vector_column: Name of the column containing the vector data.  If specified the vector will be
          removed prior to generating the uuid.
      """
      column_names = df.columns.to_list()
  
      difference_columns = set(unique_columns).difference(
          set(df.columns.to_list())
      )
      if difference_columns:
          raise ValueError(
              f"Columns {', '.join(difference_columns)} don't exist in dataframe"
          )
  
      if uuid_column is None:
          self.log.info(
              "No uuid_column provided. Generating UUIDs as column name `id`."
          )
          if "id" in column_names:
              raise ValueError(
                  "Property 'id' already in dataset. Consider renaming or specify 'uuid_column'."
              )
          else:
              uuid_column = "id"
  
      if uuid_column in column_names:
          raise ValueError(
              f"Property {uuid_column} already in dataset. Consider renaming or specify a different"
              f" 'uuid_column'."
          )
  
      df[uuid_column] = (
          df[unique_columns]
          .drop(columns=[vector_column], inplace=False, errors="ignore")
          .apply(
              lambda row: generate_uuid5(
                  identifier=row.to_dict(), namespace=class_name
              ),
              axis=1,
          )
      )
  
      return df, uuid_column
  
imports: from __future__ import annotations
  import contextlib
  import json
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Dict, List, Sequence, cast
  import requests
  import weaviate.exceptions
  from tenacity import Retrying, retry, retry_if_exception, retry_if_exception_type, stop_after_attempt
  from weaviate import Client
  from weaviate.auth import AuthApiKey, AuthBearerToken, AuthClientCredentials, AuthClientPassword
  from weaviate.data.replication import ConsistencyLevel
  from weaviate.exceptions import ObjectAlreadyExistsException
  from weaviate.util import generate_uuid5
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 32 for calling the WeaviateHook obj's underlying member method code with example usage: obj._generate_uuids(df, class_name, unique_columns, vector_column, uuid_column) and returns: df,  uuid_column