{"record":{"id":"90bec10e31c9600c","repo":"pathwaycom/pathway","slug":"json-field-paths-cannot-be-used-for-metadata-co","errorCode":null,"errorMessage":"'json_field_paths' cannot be used for {METADATA_COLUMN_NAME!r}: the connector populates this column itself when 'with_metadata=True', so any JSON path would be silently ignored.","messagePattern":"'json_field_paths' cannot be used for (.+?): the connector populates this column itself when 'with_metadata=True', so any JSON path would be silently ignored\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/io/_utils.py","lineNumber":380,"sourceCode":"            delimiter=\",\",\n            schema_registry_settings=maybe_schema_registry_settings(\n                schema_registry_settings\n            ),\n        )\n    elif data_format_type == \"jsonlines\":\n        if csv_settings is not None:\n            raise ValueError(\"Unexpected argument for json format: csv_settings\")\n        if autogenerate_key:\n            raise ValueError(\n                f\"'autogenerate_key' is only meaningful for 'raw' or \"\n                f\"'plaintext' formats and would have no effect with \"\n                f\"{format!r}. Drop it or pick a compatible format.\"\n            )\n        if json_field_paths is not None:\n            schema_columns = set(schema.column_names())\n            for field_name, path in json_field_paths.items():\n                if field_name == METADATA_COLUMN_NAME:\n                    raise ValueError(\n                        f\"'json_field_paths' cannot be used for \"\n                        f\"{METADATA_COLUMN_NAME!r}: the connector populates \"\n                        f\"this column itself when 'with_metadata=True', so \"\n                        f\"any JSON path would be silently ignored.\"\n                    )\n                if field_name not in schema_columns:\n                    raise ValueError(\n                        f\"'json_field_paths' references field {field_name!r} \"\n                        f\"which is not in the schema. Known fields: \"\n                        f\"{sorted(schema_columns)}.\"\n                    )\n                if path != \"\" and not path.startswith(\"/\"):\n                    raise ValueError(\n                        f\"Invalid JSON Pointer for field {field_name!r}: \"\n                        f\"{path!r}. JSON Pointers (RFC 6901) must be empty \"\n                        f\"or start with '/' (e.g. '/foo/bar').\"\n                    )\n        return schema, api.DataFormat(","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/io/_utils.py#L362-L398","documentation":"Error \"'json_field_paths' cannot be used for {METADATA_COLUMN_NAME!r}: the connector populates this column itself when 'with_metadata=True', so any JSON path would be silently ignored.\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/io/_utils.py:380 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the '_metadata' entry from json_field_paths; the connector fills that column itself when with_metadata=True."],"exampleFix":"pw.io.fs.read(path, format='json', schema=MySchema, with_metadata=True, json_field_paths={'data': '/data'})","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}