{"record":{"id":"76f26fbe58123308","repo":"pathwaycom/pathway","slug":"designated-timestamp-is-passed-but-designated-tim","errorCode":null,"errorMessage":"designated_timestamp is passed, but designated_timestamp_policy is {designated_timestamp_policy}","messagePattern":"designated_timestamp is passed, but designated_timestamp_policy is (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/questdb/__init__.py","lineNumber":142,"sourceCode":"\n    The command will prompt for a password. Unless you have changed it, the default password is\n    ``quest``. Once connected, you can run:\n\n    .. code-block:: sql\n\n        qdb=> select * from test;\n\n    And see the contents of the table.\n    \"\"\"\n    _check_entitlements(\"questdb\")\n\n    designated_timestamp_index = None\n    if designated_timestamp is not None:\n        if (\n            designated_timestamp_policy is not None\n            and designated_timestamp_policy != \"use_column\"\n        ):\n            raise ValueError(\n                f\"designated_timestamp is passed, but designated_timestamp_policy is {designated_timestamp_policy}\"\n            )\n        designated_timestamp_policy = \"use_column\"\n        designated_timestamp_index = get_column_index(table, designated_timestamp)\n        timestamp_dtype = table.schema.columns()[designated_timestamp.name].dtype\n        if timestamp_dtype not in (dt.DATE_TIME_NAIVE, dt.DATE_TIME_UTC):\n            raise ValueError(\n                f\"the designated_timestamp column {designated_timestamp.name!r} must have \"\n                f\"type DateTimeNaive or DateTimeUtc, but it has type {timestamp_dtype}\"\n            )\n    elif designated_timestamp_policy == \"use_column\":\n        raise ValueError(\n            'designated_timestamp_policy=\"use_column\" requires the '\n            \"designated_timestamp parameter to be set\"\n        )\n    elif designated_timestamp_policy is None:\n        designated_timestamp_policy = \"use_now\"\n","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/questdb/__init__.py#L124-L160","documentation":"Raised by pw.io.questdb.write when a designated_timestamp column is supplied together with a designated_timestamp_policy that is neither None nor 'use_column'. The policy parameter only exists to make the implicit choice explicit; passing a different value while also giving a column is contradictory, so Pathway rejects the combination at configuration time.","triggerScenarios":"pw.io.questdb.write(t, connection_string, 't', designated_timestamp=t.ts, designated_timestamp_policy='use_now') — any policy string other than 'use_column' (or omitting it) together with a designated_timestamp column.","commonSituations":"Copy-pasting a fully-populated kwargs block from another call site where the policy was set to use_now; config-driven writes that always pass every parameter; discovering the policy enum and setting it 'for completeness'.","solutions":["Drop the designated_timestamp_policy argument entirely — when designated_timestamp is given, the policy defaults to use_column.","Or set designated_timestamp_policy='use_column' explicitly to match the column you passed.","If you wanted QuestDB's server-side now() as the designated timestamp, remove the designated_timestamp column argument instead."],"exampleFix":"# before\npw.io.questdb.write(t, conn, \"t\", designated_timestamp=t.ts,\n                    designated_timestamp_policy=\"use_now\")\n\n# after\npw.io.questdb.write(t, conn, \"t\", designated_timestamp=t.ts)","handlingStrategy":"validation","validationCode":"pw.io.questdb.write(t, conn, \"t\", designated_timestamp=t.ts)  # policy omitted -> use_column","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Don't pass designated_timestamp_policy when you already pass designated_timestamp.","Keep questdb kwargs minimal: either a column, or a policy, never a mismatched pair.","Review copy-pasted kwargs blocks against the current signature."],"tags":["pathway","questdb","configuration","timestamp","conflicting-args"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}