{"record":{"id":"0fe3a77eb8af9294","repo":"apache/beam","slug":"unsupported-transform-transform-id-of-type-transform-proto","errorCode":null,"errorMessage":"Unsupported transform {transform_id} of type {transform_proto.spec.urn}","messagePattern":"Unsupported transform (.+?) of type (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/trivial_runner.py","lineNumber":128,"sourceCode":"          output_pcoll_id,\n          sum([\n              execution_state.get_pcollection_contents(pc)\n              for pc in transform_proto.inputs.values()\n          ], []))\n\n    elif transform_proto.spec.urn == common_urns.executable_stage:\n      # This is a collection of user DoFns.\n      self.execute_executable_stage(transform_proto, execution_state)\n\n    elif transform_proto.spec.urn == common_urns.primitives.GROUP_BY_KEY.urn:\n      # Execute the grouping operation.\n      self.group_by_key_and_window(\n          only_element(transform_proto.inputs.values()),\n          only_element(transform_proto.outputs.values()),\n          execution_state)\n\n    else:\n      raise RuntimeError(\n          f\"Unsupported transform {transform_id}\"\n          \" of type {transform_proto.spec.urn}\")\n\n  def execute_executable_stage(self, transform_proto, execution_state):\n    # Stage here is like a mini pipeline, with PTransforms, PCollections, etc.\n    # inside of it.\n    stage = beam_runner_api_pb2.ExecutableStagePayload.FromString(\n        transform_proto.spec.payload)\n    if stage.side_inputs:\n      # To support these we would need to make the side input PCollections\n      # available over the state API before processing this bundle.\n      raise NotImplementedError()\n\n    # This is the set of transforms that were fused together.\n    stage_transforms = {\n        id: stage.components.transforms[id]\n        for id in stage.transforms\n    }","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/trivial_runner.py#L110-L146","documentation":"The TrivialRunner (a single-process runner used mainly for testing) encountered a PTransform whose URN it does not know how to execute during execute_transform. It only implements a small set of transform types (like GBK/windowing); anything else raises RuntimeError. This means the pipeline contains a transform the trivial runner cannot simulate.","triggerScenarios":"Calling beam.pipeline.run() with runner=TrivialRunner (or run_portable_pipeline) on a pipeline containing transforms outside the supported set (e.g. custom composite URNs, side inputs, SDF) — anything falling into the else branch at trivial_runner.py:128.","commonSituations":"Using TrivialRunner to smoke-test a pipeline that uses transforms unsupported by the trivial runner; running a portable pipeline locally with an oversimplified runner; a Beam SDK change added a transform type the trivial runner doesn't handle yet.","solutions":["Run the pipeline with a real runner (DirectRunner, FlinkRunner, DataflowRunner) instead of TrivialRunner","Check which transform_id/URN is unsupported and rewrite that stage using supported transforms (e.g. plain ParDo/GBK)","Update/extend apache_beam: newer versions of trivial_runner support more URNs","If intentional, implement the missing branch in TrivialRunner.execute_transform for that URN"],"exampleFix":"// before\npipeline.run(runner=TrivialRunner())\n// after\npipeline.run(runner=DirectRunner())  # full transform support","handlingStrategy":"validation","validationCode":"SUPPORTED_URNS = {'beam:transform:group_by_key', 'beam:transform:pardo'}\nfor t in pipeline.proto.components.transforms.values():\n    urn = t.spec.urn\n    if urn and urn not in SUPPORTED_URNS:\n        print('Unsupported by TrivialRunner:', t.unique_name, urn)\n# use DirectRunner if any unsupported URN is found","typeGuard":null,"tryCatchPattern":"try:\n    pipeline.run(runner=TrivialRunner()).wait_until_finish()\nexcept RuntimeError as e:\n    if 'Unsupported transform' in str(e):\n        logging.warning('TrivialRunner unsupported; falling back to DirectRunner')\n        pipeline.run(runner=DirectRunner())\n    else:\n        raise","preventionTips":["Use TrivialRunner only for pipelines limited to the transforms it supports","Default to DirectRunner for local testing","Check the transform URNs in the pipeline proto before choosing a runner","Keep apache_beam updated so more URNs are supported"],"tags":["apache-beam","python","runner","unsupported-transform"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}