{"record":{"id":"7a8c2b6a3b2300e0","repo":"apache/beam","slug":"feastfeaturestore-handler-requires-feast-package-to-be","errorCode":null,"errorMessage":"FeastFeatureStore handler requires 'feast' package to be installed. Please install using 'pip install feast[gcp]' and try again.","messagePattern":"FeastFeatureStore handler requires 'feast' package to be installed\\. Please install using 'pip install feast\\[gcp\\]' and try again\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/yaml/yaml_enrichment.py","lineNumber":93,"sourceCode":"          handler_config parameters, see their corresponding doc pages:\n\n            - [BigQueryEnrichmentHandler](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigquery.html#apache_beam.transforms.enrichment_handlers.bigquery.BigQueryEnrichmentHandler)\n            - [BigTableEnrichmentHandler](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#apache_beam.transforms.enrichment_handlers.bigtable.BigTableEnrichmentHandler)\n            - [FeastFeatureStoreEnrichmentHandler](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.feast_feature_store.html#apache_beam.transforms.enrichment_handlers.feast_feature_store.FeastFeatureStoreEnrichmentHandler)\n            - [VertexAIFeatureStoreEnrichmentHandler](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.vertex_ai_feature_store.html#apache_beam.transforms.enrichment_handlers.vertex_ai_feature_store.VertexAIFeatureStoreEnrichmentHandler)\n        timeout (float): Timeout for source requests in seconds. Defaults to 30\n          seconds.\n    \"\"\"\n  options.YamlOptions.check_enabled(pcoll.pipeline, 'Enrichment')\n\n  if not Enrichment:\n    raise ValueError(\n        f\"gcp dependencies not installed. Cannot use {enrichment_handler} \"\n        f\"handler. Please install using 'pip install apache-beam[gcp]'.\")\n\n  if (enrichment_handler == 'FeastFeatureStore' and\n      not FeastFeatureStoreEnrichmentHandler):\n    raise ValueError(\n        \"FeastFeatureStore handler requires 'feast' package to be installed. \" +\n        \"Please install using 'pip install feast[gcp]' and try again.\")\n\n  handler_map = {\n      'BigQuery': BigQueryEnrichmentHandler,\n      'BigTable': BigTableEnrichmentHandler,\n      'FeastFeatureStore': FeastFeatureStoreEnrichmentHandler,\n      'VertexAIFeatureStore': VertexAIFeatureStoreEnrichmentHandler\n  }\n\n  if enrichment_handler not in handler_map:\n    raise ValueError(f\"Unknown enrichment source: {enrichment_handler}\")\n\n  handler = handler_map[enrichment_handler](**handler_config)\n  return pcoll | Enrichment(source_handler=handler, timeout=timeout)\n","sourceCodeStart":75,"sourceCodeEnd":109,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/yaml/yaml_enrichment.py#L75-L109","documentation":"The Beam YAML enrichment_transform built-in validates that the requested enrichment handler 'FeastFeatureStore' has its optional dependency installed. FeastFeatureStoreEnrichmentHandler is None when the 'feast' package (with gcp extras) is absent, so the transform refuses to run rather than failing later with an opaque import error. The library raises ValueError to give a clear, actionable install instruction.","triggerScenarios":"Calling enrichment_transform with enrichment_handler='FeastFeatureStore' in a Beam YAML pipeline while the 'feast' package is not installed in the current Python environment (FeastFeatureStoreEnrichmentHandler is None).","commonSituations":"Running a Beam YAML pipeline in a fresh venv, CI container, or Dataflow worker image that has apache-beam installed but not the optional feast extra; forgetting that optional handler dependencies are not installed with the core package.","solutions":["Install the feast extra: pip install 'feast[gcp]' in the environment running the pipeline.","If using Dataflow, add 'feast[gcp]' to setup_file/requirements_file or a custom container image so workers have it.","If Feast is not actually needed, switch enrichment_handler to 'BigQuery', 'BigTable', or 'VertexAIFeatureStore'."],"exampleFix":"// before (yaml)\n- type: Enrichment\n  handler: FeastFeatureStore\n# after (shell)\npip install 'feast[gcp]'","handlingStrategy":"validation","validationCode":"import importlib.util\nassert importlib.util.find_spec('feast') is not None, \"Install with: pip install 'feast[gcp]'\"","typeGuard":"def feast_available() -> bool:\n    import importlib.util\n    return importlib.util.find_spec('feast') is not None","tryCatchPattern":"try:\n    run_yaml_pipeline(spec)\nexcept ValueError as e:\n    if \"feast\" in str(e):\n        install_or_fallback_to_bigquery_handler()","preventionTips":["Pin optional extras in requirements: apache-beam[gcp] plus 'feast[gcp]'.","Smoke-test handler imports at container build time.","Use custom Dataflow worker images/requirements files when handlers need extras."],"tags":["python","apache-beam","yaml","optional-dependency","feast"],"backgroundTag":"missing-optional-dependency","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}