{"record":{"id":"8a0ec60c987775e0","repo":"pathwaycom/pathway","slug":"invalid-schema-time-columns-must-be-int-or-float","errorCode":null,"errorMessage":"Invalid schema. Time columns must be int or float.","messagePattern":"Invalid schema\\. Time columns must be int or float\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/demo/__init__.py","lineNumber":290,"sourceCode":"        schema: Schema of the resulting table.\n        time_column: Column containing the timestamps.\n        unit: Unit of the timestamps. Only 's', 'ms', 'us', and 'ns' are supported. Defaults to 's'.\n        autocommit_duration_ms: the maximum time between two commits. Every\n          autocommit_duration_ms milliseconds, the updates received by the connector are\n          committed and pushed into Pathway Live Data Framework's computation graph.\n        speedup: Produce stream `speedup` times faster than it would result from the time column.\n\n    Returns:\n        Table: The table read.\n\n    Note: the CSV files should follow a standard CSV settings. The separator is ',', the\n    quotechar is '\"', and there is no escape.\n\n    \"\"\"\n\n    time_column_type = schema.typehints().get(time_column, None)\n    if time_column_type != int and time_column_type != float:\n        raise ValueError(\"Invalid schema. Time columns must be int or float.\")\n\n    if unit not in [\"s\", \"ms\", \"us\", \"ns\"]:\n        raise ValueError(\n            \"demo.replay_csv_with_time: unit should be either 's', 'ms, 'us', or 'ns'.\"\n        )\n\n    unit_factor = 1\n    match unit:\n        case \"ms\":\n            unit_factor = 1000\n        case \"us\":\n            unit_factor = 1_000_000\n        case \"ns\":\n            unit_factor = 1_000_000_000\n        case _:\n            unit_factor = 1\n    speedup *= unit_factor\n","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/demo/__init__.py#L272-L308","documentation":"At runtime, _PathwayAirbyteSubject dispatches each record either to the incremental path (forward payload and manage state) or the full_refresh path (dedup cache via api.ref_scalar). Unknown sync_mode values fall through to a RuntimeError — an internal invariant guard after the catalog validation in pw.io.airbyte.read.","triggerScenarios":"The configured catalog passed the earlier per-stream checks in a way that left a sync_mode value other than incremental/full_refresh reaching the record-dispatch branch — e.g. a catalog mutated after construction, a monkeypatched source, or a version mismatch between validation constants and logic.","commonSituations":"Rare in normal use; appears when constructing _PathwayAirbyteSubject directly with a hand-built catalog, or when airbyte-related code paths are overridden in tests (dependency_overrides) with inconsistent sync_mode values.","solutions":["If building the subject/source manually, ensure every catalog stream uses sync_mode \"incremental\" or \"full_refresh\".","Re-run through pw.io.airbyte.read so the catalog validation in python/pathway/io/airbyte/__init__.py catches bad values before runtime.","If it reproduces with a plain pw.io.airbyte.read call, report it as a Pathway bug with the catalog JSON."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"for s in source.configured_catalog[\"streams\"]:\n    assert s[\"sync_mode\"] in {\"incremental\", \"full_refresh\"}, s","typeGuard":null,"tryCatchPattern":"try:\n    pw.run()\nexcept RuntimeError as e:\n    if \"Unknown sync_mode\" in str(e):\n        raise ValueError(f\"misconfigured airbyte catalog: {e}\") from e\n    raise","preventionTips":["Always go through pw.io.airbyte.read rather than constructing the subject directly.","Validate the whole catalog (all streams' sync_mode) before building the pipeline."],"tags":["pathway","airbyte","internal-invariant","runtime"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}