{"record":{"id":"d1b6ce485cfe7fb2","repo":"apache/beam","slug":"an-unsupported-sink-was-specified-s-please-specify-one-of","errorCode":null,"errorMessage":"An unsupported sink was specified: '%s'. Please specify one of the following sinks: %s","messagePattern":"An unsupported sink was specified: '(.+?)'\\. Please specify one of the following sinks: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/transforms/managed.py","lineNumber":171,"sourceCode":"      ICEBERG: ManagedTransforms.Urns.ICEBERG_WRITE.urn,\n      KAFKA: ManagedTransforms.Urns.KAFKA_WRITE.urn,\n      BIGQUERY: ManagedTransforms.Urns.BIGQUERY_WRITE.urn,\n      POSTGRES: ManagedTransforms.Urns.POSTGRES_WRITE.urn,\n      MYSQL: ManagedTransforms.Urns.MYSQL_WRITE.urn,\n      SQL_SERVER: ManagedTransforms.Urns.SQL_SERVER_WRITE.urn\n  }\n\n  def __init__(\n      self,\n      sink: str,\n      config: Optional[dict[str, Any]] = None,\n      config_url: Optional[str] = None,\n      expansion_service=None):\n    super().__init__()\n    self._sink = sink\n    identifier = self._WRITE_TRANSFORMS.get(sink.lower())\n    if not identifier:\n      raise ValueError(\n          f\"An unsupported sink was specified: '{sink}'. Please specify \"\n          f\"one of the following sinks: {list(self._WRITE_TRANSFORMS.keys())}\")\n\n    # Store parameters for deferred expansion service creation\n    self._identifier = identifier\n    self._provided_expansion_service = expansion_service\n    self._underlying_identifier = identifier\n    self._yaml_config = yaml.dump(config)\n    self._config_url = config_url\n\n  def expand(self, input):\n    # Create expansion service with access to pipeline options\n    expansion_service = _resolve_expansion_service(\n        self._sink,\n        self._identifier,\n        self._provided_expansion_service,\n        pipeline_options=input.pipeline._options)\n","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/transforms/managed.py#L153-L189","documentation":"Managed transform constructor validates that the `sink` argument is one of the supported write transforms (e.g. 'iceberg', 'bigquery'). It lowercases the sink string and looks it up in the _WRITE_TRANSFORMS map; if absent, ValueError is raised listing valid sinks.","triggerScenarios":"Calling apache_beam.transforms.managed.Write(sink='iceburg') (typo), or with a sink name not in _WRITE_TRANSFORMS keys, or an empty/None sink string.","commonSituations":"Typos in sink names, copying examples from an older Beam version whose managed API supported different sinks, passing uppercase/mixed-case names that don't match (handled by .lower(), so usually typos or unsupported sinks).","solutions":["Use one of the sinks listed in the error message (e.g. 'iceberg', 'bigquery').","Check the exact spelling of the sink name against apache_beam/transforms/managed.py _WRITE_TRANSFORMS.","Upgrade apache_beam if the sink you need was added in a newer release."],"exampleFix":"// before\nbeam.managed.Write('iceburg')\n// after\nbeam.managed.Write('iceberg')","handlingStrategy":"validation","validationCode":"from apache_beam.transforms.managed import Write\nSUPPORTED = list(Write._WRITE_TRANSFORMS.keys())\nassert sink and sink.lower() in SUPPORTED, f\"sink must be one of {SUPPORTED}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy sink names from the official docs or the error's allowed list","Keep Beam SDK version current so newly supported sinks appear"],"tags":["python","apache-beam","validation"],"backgroundTag":"invalid-enum-value","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"}