{"record":{"id":"836ed05e1108a323","repo":"pathwaycom/pathway","slug":"schema-registry-settings-was-provided-without-s","errorCode":null,"errorMessage":"'schema_registry_settings' was provided without 'subject'. When a schema registry is configured, 'subject' must also be set so the formatter knows which subject to encode under.","messagePattern":"'schema_registry_settings' was provided without 'subject'\\. When a schema registry is configured, 'subject' must also be set so the formatter knows which subject to encode under\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":466,"sourceCode":"        subject: str | None = None,\n        allowed_key_types: tuple[dt.DType, ...] | None = (dt.BYTES, dt.STR, dt.ANY),\n        allowed_value_types: tuple[dt.DType, ...] | None = (dt.BYTES, dt.STR, dt.ANY),\n    ) -> MessageQueueOutputFormat:\n        if delimiter != \",\" and format != \"dsv\":\n            raise ValueError(\n                f\"'delimiter' is only meaningful for the 'dsv' format, but \"\n                f\"{format!r} was specified. Drop the 'delimiter' argument \"\n                f\"or use format='dsv'.\"\n            )\n        if subject is not None and schema_registry_settings is None:\n            raise ValueError(\n                \"'subject' was provided without 'schema_registry_settings'. \"\n                \"The 'subject' parameter only has an effect when a schema \"\n                \"registry is configured; either pass 'schema_registry_settings' \"\n                \"or remove 'subject'.\"\n            )\n        if schema_registry_settings is not None and subject is None:\n            raise ValueError(\n                \"'schema_registry_settings' was provided without 'subject'. \"\n                \"When a schema registry is configured, 'subject' must also be \"\n                \"set so the formatter knows which subject to encode under.\"\n            )\n        if subject is not None and not subject:\n            raise ValueError(\n                \"'subject' must be a non-empty string; got an empty string. \"\n                \"Schema Registry subjects identify a named schema version, \"\n                \"and an empty subject is never a valid registry entry.\"\n            )\n        if schema_registry_settings is not None and format != \"json\":\n            raise ValueError(\n                f\"'schema_registry_settings' is only meaningful for the 'json' \"\n                f\"format, but {format!r} was specified. The Confluent Schema \"\n                \"Registry currently encodes JSON payloads only; remove \"\n                \"'schema_registry_settings' or use format='json'.\"\n            )\n","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L448-L484","documentation":"Raised by MessageQueueOutputFormat.build when schema_registry_settings is provided without 'subject'. When encoding through the Confluent Schema Registry, the writer must know which subject to register/look up the schema under; registry settings alone are incomplete configuration, so Pathway requires the pair.","triggerScenarios":"pw.io.kafka.write(table, ..., schema_registry_settings=settings) with no subject; enabling registry settings copied from the read side (where no subject is needed) on the write side.","commonSituations":"Asymmetric configs: reading with a registry needs no subject, writing does; partial migration of an existing writer to schema-registry mode.","solutions":["Add the matching subject, e.g. subject='my-topic-value' (Confluent convention: <topic>-value for message values).","If the registry is not actually wanted, remove schema_registry_settings entirely."],"exampleFix":"# before\npw.io.kafka.write(t, ...,\n    schema_registry_settings=pw.io.kafka.SchemaRegistrySettings(url=REGISTRY_URL))\n\n# after\npw.io.kafka.write(t, ...,\n    schema_registry_settings=pw.io.kafka.SchemaRegistrySettings(url=REGISTRY_URL),\n    subject='my-topic-value')","handlingStrategy":"validation","validationCode":"if schema_registry_settings is not None:\n    assert subject, \"schema_registry_settings requires a non-empty subject\"","typeGuard":null,"tryCatchPattern":"try:\n    pw.io.kafka.write(t, ..., schema_registry_settings=settings)\nexcept ValueError as e:\n    if \"without 'subject'\" in str(e):\n        pw.io.kafka.write(t, ..., schema_registry_settings=settings, subject=f'{topic}-value')\n    else:\n        raise","preventionTips":["Default subject to '<topic>-value' (Confluent convention) whenever registry settings are present.","Remember the asymmetry: read side needs no subject, write side does."],"tags":["pathway","kafka","schema-registry","output","validation"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}