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: Delete all object that belong to list of documents.
  
  :param document_keys: list of unique documents identifiers.
  :param document_column: Column in DataFrame that identifying source document.
  :param class_name: Name of the class in Weaviate schema where data is to be ingested.
  :param total_objects_count: total number of objects to delete, needed as max limit on one delete
      query is 10,000, if we have more objects to delete we need to run query multiple times.
  :param batch_delete_error: list to hold errors while inserting.
  :param tenant: The tenant to which the object will be added.
  :param batch_config_params: Additional parameters for Weaviate batch configuration.
  :param verbose: Flag to enable verbose output during the ingestion process.
docstr_tok: ["Delete","all","object","that","belong","to","list","of","documents",".",":","param","document_keys",":","list","of","unique","documents","identifiers",".",":","param","document_column",":","Column","in","DataFrame","that","identifying","source","document",".",":","param","class_name",":","Name","of","the","class","in","Weaviate","schema","where","data","is","to","be","ingested",".",":","param","total_objects_count",":","total","number","of","objects","to","delete",",","needed","as","max","limit","on","one","delete","query","is","10,000",",","if","we","have","more","objects","to","delete","we","need","to","run","query","multiple","times",".",":","param","batch_delete_error",":","list","to","hold","errors","while","inserting",".",":","param","tenant",":","The","tenant","to","which","the","object","will","be","added",".",":","param","batch_config_params",":","Additional","parameters","for","Weaviate","batch","configuration",".",":","param","verbose",":","Flag","to","enable","verbose","output","during","the","ingestion","process","."]
code: def _delete_all_documents_objects(
      self,
      document_keys: list[str],
      document_column: str,
      class_name: str,
      total_objects_count: int = 1,
      batch_delete_error: list | None = None,
      tenant: str | None = None,
      batch_config_params: dict[str, Any] | None = None,
      verbose: bool = False,
  ):
      """Delete all object that belong to list of documents.
  
      :param document_keys: list of unique documents identifiers.
      :param document_column: Column in DataFrame that identifying source document.
      :param class_name: Name of the class in Weaviate schema where data is to be ingested.
      :param total_objects_count: total number of objects to delete, needed as max limit on one delete
          query is 10,000, if we have more objects to delete we need to run query multiple times.
      :param batch_delete_error: list to hold errors while inserting.
      :param tenant: The tenant to which the object will be added.
      :param batch_config_params: Additional parameters for Weaviate batch configuration.
      :param verbose: Flag to enable verbose output during the ingestion process.
      """
      batch_delete_error = batch_delete_error or []
  
      if not batch_config_params:
          batch_config_params = {}
  
      # This limit is imposed by Weavaite database
      MAX_LIMIT_ON_TOTAL_DELETABLE_OBJECTS = 10000
  
      self.conn.batch.configure(**batch_config_params)
      with self.conn.batch as batch:
          # ConsistencyLevel.ALL is essential here to guarantee complete deletion of objects
          # across all nodes. Maintaining this level ensures data integrity, preventing
          # irrelevant objects from providing misleading context for LLM models.
          batch.consistency_level = ConsistencyLevel.ALL
          while total_objects_count > 0:
              document_objects = batch.delete_objects(
                  class_name=class_name,
                  where={
                      "operator": "Or",
                      "operands": [
                          {
                              "path": [document_column],
                              "operator": "Equal",
                              "valueText": key,
                          }
                          for key in document_keys
                      ],
                  },
                  output="verbose",
                  dry_run=False,
                  tenant=tenant,
              )
              total_objects_count = (
                  total_objects_count
                  - MAX_LIMIT_ON_TOTAL_DELETABLE_OBJECTS
              )
              matched_objects = document_objects["results"]["matches"]
              batch_delete_error = [
                  {"uuid": obj["id"]}
                  for obj in document_objects["results"]["objects"]
                  if "error" in obj["status"]
              ]
              if verbose:
                  self.log.info("Deleted %s Objects", matched_objects)
  
      return batch_delete_error
  
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 36 for calling the WeaviateHook obj's underlying member method code with example usage: obj._delete_all_documents_objects(document_keys, document_column, class_name, total_objects_count, batch_delete_error, tenant, batch_config_params, verbose) and returns: batch_delete_error