A schema defines the structure of stored data. In a Weaviate collection, properties specify field names, data types, and which values participate in vectorization. section 14.6.2
A recipe collection can define these properties:
- recipe_uuid: a UUID identifying the recipe, excluded from vectorization. section 14.6.2
- recipe_name: a text field containing the recipe name. section 14.6.2
- chunk_uuid: a UUID identifying the content chunk, also excluded from vectorization. section 14.6.2
- chunk: a text field containing the content section to vectorize. section 14.6.2
Schema creation is commonly made repeatable. Check whether the collection already exists, create it only when absent, and delete and recreate it when its definition must change. A dedicated creation task makes this state visible in Airflow. section 14.6.3
Schema migration in Airflow
Airflow's metastore schema can be initialized or upgraded with `airflow db migrate`. The command creates the schema when necessary or applies migration steps for the current database version. Related commands check reachability, reset the database, clean old records, downgrade to a specified revision, or open a database shell. section 15.3
Listing 14.9 Defining the properties of the collection
from weaviate.classes.config Property
from weaviate.classes.config import DataType
...
with get_weaviate_client() as client:
collection = client.collections.create(
name = ...,
vectorizer_config = [...]
properties=[
Property(
name="recipe_uuid",
data_type= DataType.UUID,
skip_vectorization=True #1
),
Property(name="recipe_name", data_type= DataType.TEXT),
Property(
name="chunk_uuid",
data_type= DataType.UUID,
skip_vectorization=True #1
),
Property(name="chunk", data_type=DataType.TEXT),
]
)
Inspect the Python property definitions for UUID and text fields, including the settings that skip vectorization for identifiers. section 14.6.2











































