class_docstr: This handler handles connection and execution of the Weaviate statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","Weaviate","statements","."]
code: def add_metadata(self, data: dict, table_name: str):
      table_name = table_name.capitalize()
      metadata_table_name = table_name.capitalize() + "_metadata"
      self._client.schema.get(metadata_table_name)
      # getting existing metadata fields
      added_prop_list = [
          prop["name"]
          for prop in self._client.schema.get(metadata_table_name)[
              "properties"
          ]
      ]
      # as metadata columns are not fixed, at every entry, a check takes place for the columns
      for prop in data.keys():
          if prop not in added_prop_list:
              if isinstance(data[prop], int):
                  add_prop = {
                      "name": prop,
                      "dataType": ["int"],
                  }
              elif isinstance(data[prop][0], datetime):
                  add_prop = {
                      "name": prop,
                      "dataType": ["date"],
                  }
              else:
                  add_prop = {
                      "name": prop,
                      "dataType": ["string"],
                  }
              # when a new column is identified, it is added to the metadata table
              self._client.schema.property.create(
                  metadata_table_name, add_prop
              )
      metadata_id = self._client.data_object.create(
          data_object=data,
          class_name=table_name.capitalize() + "_metadata",
      )
      return metadata_id
  
imports: from collections import OrderedDict
  from datetime import datetime
  from typing import List, Optional
  import weaviate
  from weaviate.embedded import EmbeddedOptions
  import pandas
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.response import RESPONSE_TYPE
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerStatusResponse
  from mindsdb.integrations.libs.vectordatabase_handler import FilterCondition, FilterOperator, TableField, VectorStoreHandler
  from mindsdb.utilities import log
  from weaviate.util import generate_uuid5
label_desc: Use image node_id 18 for calling the WeaviateDBHandler obj's underlying member method code with example usage: obj.add_metadata(data, table_name) and returns: metadata_id