pathwaycom/pathway · error · ValueError
'raw' endpoint input format requires 'value' column in schem
Error message
'raw' endpoint input format requires 'value' column in schema
What it means
Raised by pw.io.http.rest_connector when the endpoint runs in 'raw' input format but the schema has no column named 'query' (QUERY_SCHEMA_COLUMN = 'query'). In raw mode Pathway reads the plain request body into a single column, which must be called 'query'; the OpenAPI plaintext schema generator then needs that column to describe the endpoint. The error message saying 'value' column is misleading — the code actually looks up the 'query' column.
Source
Thrown at python/pathway/io/http/_server.py:226
endpoint_description["description"] = self.description
if self.summary is not None:
endpoint_description["summary"] = self.summary
return {method.lower(): endpoint_description}
def _is_method_exposed(self, method):
return self.method_types is None or method.upper() in self.method_types
def _add_optional_traits_if_present(self, field_description, props):
if props.example is not None:
field_description["example"] = props.example
if props.description is not None:
field_description["description"] = props.description
def _construct_openapi_plaintext_schema(self, schema) -> dict:
query_column = schema.columns().get(QUERY_SCHEMA_COLUMN)
if query_column is None:
raise ValueError(
"'raw' endpoint input format requires 'value' column in schema"
)
openapi_type = _ENGINE_TO_OPENAPI_TYPE.get(query_column, "string")
openapi_format = _ENGINE_TO_OPENAPI_FORMAT.get(query_column)
description = {
"type": openapi_type,
}
if openapi_format:
description["format"] = openapi_format
if query_column.has_default_value():
description["default"] = query_column.default_value
self._add_optional_traits_if_present(description, query_column)
return description
def _construct_openapi_get_request_schema(self, schema) -> list:
parameters = []
for name, props in schema.columns().items():View on GitHub (pinned to fa2f74a464)
Solutions
- If you want raw body ingestion, pass schema=None and let rest_connector build the default 'query' column.
- If you supply a custom schema, make sure it contains a column literally named 'query' when raw format is used: pw.schema_builder({'query': pw.column_definition(dtype=str)}).
- For structured JSON payloads, use a full custom schema with typed columns (format switches to 'custom' automatically when schema is given to rest_connector).
Example fix
# before
schema = pw.schema_builder({"value": pw.column_definition()})
# after
schema = pw.schema_builder({"query": pw.column_definition()}) # or simply schema=None Defensive patterns
Strategy: validation
Validate before calling
from pathway import io as pio
def has_query_column(schema) -> bool:
return "query" in schema.columns() Type guard
def is_raw_ready_schema(schema) -> bool:
cols = schema.columns()
return cols is not None and "query" in cols Prevention
- For raw body ingestion pass schema=None instead of hand-building one.
- If you build a raw-mode schema yourself, always name the single column 'query'.
- Add a unit test asserting 'query' in schema.columns() before connector setup.
When it happens
Trigger: Calling pw.io.http.rest_connector(...) with schema=None triggers the built-in raw schema pw.schema_builder({'query': ...}), so this error normally does not fire from that path. It fires when a custom schema lacking a 'query' column is combined with raw-format handling, e.g. via the internal RestServerSubject with format='raw', or when a schema passed to the connector defines columns like 'value' or 'data' instead of 'query'.
Common situations: Developers porting older REST connector code that used a 'value' column name; constructing a schema with pw.schema_builder({'value': pw.column_definition()}) and expecting raw body ingestion; calling lower-level internals with a custom schema but defaulting to raw format.
Related errors
- If webserver object isn't specified, host and port must be p
- If webserver object is specified, host and port shouldn't be
- Failed to detect the region of S3 bucket {bucket!r} (HTTP st
- SchemaRegistryHeader.value must be a str, got {type(self.val
- argument {name} has incorrect schema
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/5801705adc1ebb79.
Report an issue: GitHub.