{"record":{"id":"d906439da485b0ae","repo":"pathwaycom/pathway","slug":"received-id-argument-of-join-that-is-a-string-d","errorCode":null,"errorMessage":"Received `id` argument of join that is a string.\nDid you mean <table>.{id} instead of {repr(id)}?","messagePattern":"Received `id` argument of join that is a string\\.\nDid you mean <table>\\.(.+?) instead of (.+?)\\?","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/internals/arg_handlers.py","lineNumber":109,"sourceCode":"                )\n            else:\n                raise ValueError(\n                    \"How argument of join should be one of \"\n                    + \"JoinMode.INNER, JoinMode.LEFT, JoinMode.RIGHT or JoinMode.OUTER values.\"\n                )\n\n        if \"id\" in kwargs:\n            id = kwargs.pop(\"id\")\n            processed_kwargs[\"id\"] = id\n            if not allow_id:\n                raise ValueError(\n                    \"Received `id` argument but was not expecting any.\\n\"\n                    + \"Not every join type supports `id` argument.\"\n                )\n            elif id is None:\n                pass\n            elif isinstance(id, str):\n                raise ValueError(\n                    \"Received `id` argument of join that is a string.\\n\"\n                    + f\"Did you mean <table>.{id}\"\n                    + f\" instead of {repr(id)}?\"\n                )\n            elif not isinstance(id, expr.ColumnReference):\n                raise ValueError(\n                    \"The id argument of a join has to be a ColumnReference.\"\n                )\n\n        if \"defaults\" in kwargs:\n            processed_kwargs[\"defaults\"] = kwargs.pop(\"defaults\")\n\n        if \"left_instance\" in kwargs and \"right_instance\" in kwargs:\n            processed_kwargs[\"left_instance\"] = kwargs.pop(\"left_instance\")\n            processed_kwargs[\"right_instance\"] = kwargs.pop(\"right_instance\")\n        elif \"left_instance\" in kwargs or \"right_instance\" in kwargs:\n            raise ValueError(\n                \"`left_instance` and `right_instance` arguments to join \"","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/internals/arg_handlers.py#L91-L127","documentation":"Where a join accepts 'id', it must be a ColumnReference (e.g. t.id), not the column's name as a string. Passing id='id' is the classic slip this guard catches, and the message helpfully suggests the attribute access you probably meant (<table>.<name>). The check runs in the shared join kwargs handler after the string is popped from kwargs.","triggerScenarios":"t1.join_any(t2, t1.k == t2.k, id='id'); id='left_id'; id built by f-string from a column name variable.","commonSituations":"Config-driven code where the id column arrives as its name; autocomplete choosing the string form; examples from other libraries where ids are strings.","solutions":["Pass the reference: id=t1.id (whichever table's identity you want).","If the column name is dynamic, use operator.attrgetter or getattr(table, name).","Do not quote the attribute in examples copied from docs."],"exampleFix":"# before\nt1.join_any(t2, t1.k == t2.k, id=\"id\")\n\n# after\nt1.join_any(t2, t1.k == t2.k, id=t1.id)","handlingStrategy":"type-guard","validationCode":"import pathway as pw\n\nid_value = getattr(t1, \"id\")  # ColumnReference built from the table, not a name string\nassert isinstance(id_value, pw.ColumnReference)","typeGuard":"import pathway as pw\n\ndef is_column_reference(v) -> bool:\n    return isinstance(v, pw.ColumnReference)","tryCatchPattern":null,"preventionTips":["Pass column references (t.id), never column names, to id=.","For dynamic column names use getattr(table, name)."],"tags":["join","api-misuse","id-column","type-error"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}