Skip to main content
Version: 1.4.0 (latest)

destinations.impl.weaviate.weaviate_client

LoadWeaviateJob Objects

class LoadWeaviateJob(RunnableLoadJob)

[view_source]

load_batch

@wrap_weaviate_error
def load_batch(f: IO[str]) -> None

[view_source]

Load all the lines from stream f in automatic Weaviate batches. Weaviate batch supports retries so we do not need to do that.

WeaviateClient Objects

class WeaviateClient(JobClientBase, WithStateSync)

[view_source]

Weaviate client implementation.

make_qualified_class_name

def make_qualified_class_name(table_name: str) -> str

[view_source]

Make a full Weaviate class name from a table name by prepending the dataset name if it exists.

get_class_schema

def get_class_schema(table_name: str) -> Dict[str, Any]

[view_source]

Get the Weaviate class schema for a table.

create_class

def create_class(class_schema: Dict[str, Any],
full_class_name: Optional[str] = None) -> None

[view_source]

Create a Weaviate class.

Arguments:

  • class_schema - The class schema to create.
  • full_class_name - The full name of the class to create. If not provided, the class name will be prepended with the dataset name if it exists.

create_class_property

def create_class_property(class_name: str, prop_schema: Dict[str,
Any]) -> None

[view_source]

Create a Weaviate class property.

Arguments:

  • class_name - The name of the class to create the property on.
  • prop_schema - The property schema to create.

delete_class

def delete_class(class_name: str) -> None

[view_source]

Delete a Weaviate class.

Arguments:

  • class_name - The name of the class to delete.

delete_all_classes

def delete_all_classes() -> None

[view_source]

Delete all Weaviate classes from Weaviate instance and all data associated with it.

query_class

def query_class(class_name: str, properties: List[str]) -> GetBuilder

[view_source]

Query a Weaviate class.

Arguments:

  • class_name - The name of the class to query.
  • properties - The properties to return.

Returns:

A Weaviate query builder.

create_object

def create_object(obj: Dict[str, Any], class_name: str) -> None

[view_source]

Create a Weaviate object.

Arguments:

  • obj - The object to create.
  • class_name - The name of the class to create the object on.

drop_storage

def drop_storage() -> None

[view_source]

Drop the dataset from Weaviate instance.

Deletes all classes in the dataset and all data associated with them. Deletes the sentinel class as well.

If dataset name was not provided, it deletes all the tables in the current schema

get_stored_state

def get_stored_state(pipeline_name: str) -> Optional[StateInfo]

[view_source]

Loads compressed state from destination storage

get_stored_schema

def get_stored_schema(schema_name: str = None) -> Optional[StorageSchemaInfo]

[view_source]

Retrieves newest schema from destination storage

make_weaviate_class_schema

def make_weaviate_class_schema(table_name: str) -> Dict[str, Any]

[view_source]

Creates a Weaviate class schema from a table schema.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.