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","."]
docstr: Create a class with the given name in the weaviate database.
docstr_tok: ["Create","a","class","with","the","given","name","in","the","weaviate","database","."]
code: def create_table(
      self, table_name: str, if_not_exists=True
  ) -> HandlerResponse:
      """
      Create a class with the given name in the weaviate database.
      """
      # separate metadata table for each table (as different tables will have different metadata columns)
      # this reduces the query time using metadata but increases the insertion time
      metadata_table_name = table_name + "_metadata"
      if not self._client.schema.exists(metadata_table_name):
          self._client.schema.create_class(
              {"class": metadata_table_name}
          )
      if not self._client.schema.exists(table_name):
          self._client.schema.create_class(
              {
                  "class": table_name,
                  "properties": [
                      {"dataType": ["text"], "name": prop["name"]}
                      for prop in self.SCHEMA
                      if prop["name"] != "id"
                      and prop["name"] != "embeddings"
                      and prop["name"] != "metadata"
                  ],
                  "vectorIndexType": "hnsw",
              }
          )
          add_prop = {
              "name": "associatedMetadata",
              "dataType": [metadata_table_name.capitalize()],
          }
          self._client.schema.property.create(
              table_name.capitalize(), add_prop
          )
  
      return Response(resp_type=RESPONSE_TYPE.OK)
  
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 14 for calling the WeaviateDBHandler obj's underlying member method code with example usage: obj.create_table(table_name, if_not_exists) and returns: Response