{"record":{"id":"4b608ecb3790daac","repo":"pathwaycom/pathway","slug":"demo-replay-csv-with-time-unit-should-be-either","errorCode":null,"errorMessage":"demo.replay_csv_with_time: unit should be either 's', 'ms, 'us', or 'ns'.","messagePattern":"demo\\.replay_csv_with_time: unit should be either 's', 'ms, 'us', or 'ns'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/demo/__init__.py","lineNumber":293,"sourceCode":"        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\n    columns = set(schema.column_names())\n\n    class FileStreamSubject(pw.io.python.ConnectorSubject):","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/demo/__init__.py#L275-L311","documentation":"Airbyte connector state persistence maps one Pathway persistence subject to one Airbyte state blob, which is only well-defined for a single stream. on_persisted_run raises RuntimeError when a persisted run configures more than one stream.","triggerScenarios":"Running pw.io.airbyte.read with persistence enabled (pw.persistence.Config / pw.run with persistence) while the streams argument lists two or more streams.","commonSituations":"A working multi-stream non-persistent setup is later migrated to persistent mode for exactly-once resume; the same configuration now fails on restart setup.","solutions":["Split into one pw.io.airbyte.read call per stream, each with a unique name and its own persistence state.","Union the resulting tables afterwards if a single table view is needed.","Alternatively drop persistence for this connector if multi-stream resume is not required."],"exampleFix":"# before\nt = pw.io.airbyte.read(..., streams=[\"users\",\"orders\"], persistence_mode=\"syncing\", persistence_config=cfg)\n\n# after\nt_users = pw.io.airbyte.read(..., streams=[\"users\"], name=\"airbyte_users\", persistence_mode=\"syncing\", persistence_config=cfg)\nt_orders = pw.io.airbyte.read(..., streams=[\"orders\"], name=\"airbyte_orders\", persistence_mode=\"syncing\", persistence_config=cfg)","handlingStrategy":"validation","validationCode":"if persistence_enabled and isinstance(streams, list) and len(streams) > 1:\n    raise ValueError(\n        \"persistent airbyte connectors support one stream each; split the read\"\n    )\npw.io.airbyte.read(..., streams=streams)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default to one stream per airbyte connector with a unique name; union tables afterwards.","Decide persistence requirements before choosing the single- vs multi-stream read shape."],"tags":["pathway","airbyte","persistence","multi-stream","runtime"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}