MCPcopy Index your code
hub / github.com/pathwaycom/pathway / assert_schema_not_none

Function assert_schema_not_none

python/pathway/io/_utils.py:196–209  ·  view source on GitHub ↗
(
    schema: type[Schema] | None,
    data_format_type: str | None = None,
)

Source from the content-addressed store, hash-verified

194
195
196def assert_schema_not_none(
197 schema: type[Schema] | None,
198 data_format_type: str | None = None,
199) -> type[Schema]:
200 if schema is None:
201 if data_format_type == "dsv":
202 raise ValueError(
203 "Schema must be specified. "
204 "Consider using `pw.schema_from_csv` for generating schema from a CSV file"
205 )
206 else:
207 raise ValueError("Schema must be specified.")
208 else:
209 return schema
210
211
212class PlaintextKeySchema(pw.Schema):

Callers 2

readFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected