{"record":{"id":"0ee2669e9ca7a270","repo":"pathwaycom/pathway","slug":"column-s-reserved-property-columns-r-use-a-name","errorCode":null,"errorMessage":"Column(s) {reserved_property_columns!r} use a name reserved by Weaviate ('id' and 'vector' cannot be object properties). Rename the column(s), or pass one as the primary_key / vector argument.","messagePattern":"Column\\(s\\) (.+?) use a name reserved by Weaviate \\('id' and 'vector' cannot be object properties\\)\\. Rename the column\\(s\\), or pass one as the primary_key / vector argument\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/weaviate/__init__.py","lineNumber":143,"sourceCode":"            f\"e.g. vector=table.{vector._name}.\"\n        )\n\n    pk = primary_key._name if primary_key is not None else None\n    vector_field = vector._name if vector is not None else None\n\n    # Weaviate reserves \"id\" and \"vector\" as object-level keys and rejects them as\n    # property names. The primary key (encoded in the UUID) and the vector column\n    # are never sent as properties, so they may freely use these names; any other\n    # column that does collides and is reported up front.\n    reserved_property_columns = [\n        column_name\n        for column_name in table.schema.column_names()\n        if column_name in (\"id\", \"vector\")\n        and column_name != pk\n        and column_name != vector_field\n    ]\n    if reserved_property_columns:\n        raise ValueError(\n            f\"Column(s) {reserved_property_columns!r} use a name reserved by \"\n            f\"Weaviate ('id' and 'vector' cannot be object properties). Rename \"\n            f\"the column(s), or pass one as the primary_key / vector argument.\"\n        )\n\n    scheme = \"https\" if http_secure else \"http\"\n    url = f\"{scheme}://{http_host}:{http_port}\"\n\n    data_storage = api.DataStorage(\n        storage_type=\"weaviate\",\n        weaviate_params=api.WeaviateParams(\n            url=url,\n            collection_name=collection_name,\n            pk_field=pk,\n            vector_field=vector_field,\n            api_key=api_key,\n            headers=headers,\n            batch_size=batch_size,","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/weaviate/__init__.py#L125-L161","documentation":"Weaviate reserves the object-level keys `id` and `vector` and rejects them as property names. Pathway encodes the primary key into the UUID and sends the vector separately, so those two column names are legal only for the columns designated as primary_key / vector arguments; any other column named `id` or `vector` would be rejected by Weaviate at runtime. The connector enumerates table.schema.column_names() up front and raises this ValueError listing the offending reserved columns.","triggerScenarios":"Calling pw.io.weaviate.write(table, ...) where the schema contains a column named `id` or `vector` that is NOT the column passed as primary_key or vector — e.g. primary_key=t.uuid with a separate t.id column still present, or an unused t.vector column.","commonSituations":"Source data (CSV/JSON) that already has an `id` field while the user designates a different UUID key; embedding pipelines that store a raw `vector` column alongside the designated vector argument; reusing a generic schema across multiple sinks.","solutions":["Rename the offending column before writing: t = t.select(**{('prop_' + c if c in ('id','vector') else c): pw.this[c] for c in t.schema.columns()}).","Drop it if redundant: t = t.without(pw.this.id).","Designate the reserved-named column as the primary_key (or vector) argument if it is indeed the key/vector, which makes the name legal."],"exampleFix":"# before\nt = pw.debug.table_from_markdown('uuid | id | text')\npw.io.weaviate.write(t, collection_name=\"Docs\", primary_key=t.uuid)\n\n# after\nt = t.rename_columns(source_id=pw.this.id)\npw.io.weaviate.write(t, collection_name=\"Docs\", primary_key=t.uuid)","handlingStrategy":"validation","validationCode":"def check_weaviate_reserved(table, pk=None, vector=None):\n    hits = [\n        c for c in table.schema.column_names()\n        if c in (\"id\", \"vector\") and c != pk and c != vector\n    ]\n    if hits:\n        raise ValueError(f\"reserved property names present: {hits}\")\n    return True","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefix external `id`/`vector` fields at ingest (source_id, raw_vector) when the destination is Weaviate.","Designate the natural `id` column as the primary_key argument so the reserved name is used legally."],"tags":["pathway","weaviate","vector-store","naming-conflict"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}