{"record":{"id":"40cb3b1e6559a904","repo":"apache/beam","slug":"root-provider-for-s-not-implemented-in-runner-s","errorCode":null,"errorMessage":"Root provider for [%s] not implemented in runner %s","messagePattern":"Root provider for \\[(.+?)\\] not implemented in runner (.+?)","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/direct/transform_evaluator.py","lineNumber":145,"sourceCode":"\n    if not evaluator:\n      raise NotImplementedError(\n          'Execution of [%s] not implemented in runner %s.' %\n          (type(applied_ptransform.transform), self))\n    return evaluator(\n        self._evaluation_context,\n        applied_ptransform,\n        input_committed_bundle,\n        side_inputs)\n\n  def get_root_bundle_provider(self, applied_ptransform):\n    provider_cls = None\n    for cls in applied_ptransform.transform.__class__.mro():\n      provider_cls = self._root_bundle_providers.get(cls)\n      if provider_cls:\n        break\n    if not provider_cls:\n      raise NotImplementedError(\n          'Root provider for [%s] not implemented in runner %s' %\n          (type(applied_ptransform.transform), self))\n    return provider_cls(self._evaluation_context, applied_ptransform)\n\n  def should_execute_serially(self, applied_ptransform):\n    \"\"\"Returns True if this applied_ptransform should run one bundle at a time.\n\n    Some TransformEvaluators use a global state object to keep track of their\n    global execution state. For example evaluator for _GroupByKeyOnly uses this\n    state as an in memory dictionary to buffer keys.\n\n    Serially executed evaluators will act as syncing point in the graph and\n    execution will not move forward until they receive all of their inputs. Once\n    they receive all of their input, they will release the combined output.\n    Their output may consist of multiple bundles as they may divide their output\n    into pieces before releasing.\n\n    Args:","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/direct/transform_evaluator.py#L127-L163","documentation":"Root transforms (no input PCollection) need a RootBundleProvider that seeds initial bundles. get_root_bundle_provider searches the transform's MRO in _root_bundle_providers and raises NotImplementedError when no provider class exists for the transform type.","triggerScenarios":"Executing a pipeline whose root (source) PTransform has no registered root bundle provider in DirectRunner — e.g. an unknown or custom source transform, or a root primitive only implemented for other runners.","commonSituations":"Using a custom source/root transform locally; a root-level transform added in a newer Beam release than the runner code; misconfigured pipeline where an unsupported connector is the entry point.","solutions":["Use a supported root transform (beam.Create, supported file/connector readers).","Register a root bundle provider class for the transform in _root_bundle_providers.","Upgrade apache-beam to a version with support for this root transform.","Switch to a runner that implements the root transform."],"exampleFix":"# before\ncoll = pipeline | MyCustomRootSource()\n# after\ncoll = pipeline | beam.Create(my_input_iterable)","handlingStrategy":"validation","validationCode":"from apache_beam.runners.direct import transform_evaluator as te\nif not any(cls in te._TransformEvaluatorRegistry._root_bundle_providers for cls in type(root_transform).__mro__):\n    raise ValueError('root transform unsupported by DirectRunner')","typeGuard":"def has_root_provider(t) -> bool:\n    from apache_beam.runners.direct import transform_evaluator as te\n    return any(cls in te._TransformEvaluatorRegistry._root_bundle_providers for cls in type(t).__mro__)","tryCatchPattern":"try:\n    pipeline.run()\nexcept NotImplementedError as e:\n    if 'Root provider' in str(e):\n        replace_root_with_supported_source()","preventionTips":["Start pipelines with beam.Create or other documented sources.","Never wire an unknown transform as the pipeline root under DirectRunner.","Add a local DirectRunner smoke test for every new source."],"tags":["python","apache-beam","directrunner","source"],"backgroundTag":"method-not-implemented","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"}