apache/beam · error · ValueError
FeastFeatureStore handler requires 'feast' package to be ins
Error message
FeastFeatureStore handler requires 'feast' package to be installed. Please install using 'pip install feast[gcp]' and try again.
What it means
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.
Source
Thrown at sdks/python/apache_beam/yaml/yaml_enrichment.py:93
handler_config parameters, see their corresponding doc pages:
- [BigQueryEnrichmentHandler](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigquery.html#apache_beam.transforms.enrichment_handlers.bigquery.BigQueryEnrichmentHandler)
- [BigTableEnrichmentHandler](https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.enrichment_handlers.bigtable.html#apache_beam.transforms.enrichment_handlers.bigtable.BigTableEnrichmentHandler)
- [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)
- [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)
timeout (float): Timeout for source requests in seconds. Defaults to 30
seconds.
"""
options.YamlOptions.check_enabled(pcoll.pipeline, 'Enrichment')
if not Enrichment:
raise ValueError(
f"gcp dependencies not installed. Cannot use {enrichment_handler} "
f"handler. Please install using 'pip install apache-beam[gcp]'.")
if (enrichment_handler == 'FeastFeatureStore' and
not FeastFeatureStoreEnrichmentHandler):
raise ValueError(
"FeastFeatureStore handler requires 'feast' package to be installed. " +
"Please install using 'pip install feast[gcp]' and try again.")
handler_map = {
'BigQuery': BigQueryEnrichmentHandler,
'BigTable': BigTableEnrichmentHandler,
'FeastFeatureStore': FeastFeatureStoreEnrichmentHandler,
'VertexAIFeatureStore': VertexAIFeatureStoreEnrichmentHandler
}
if enrichment_handler not in handler_map:
raise ValueError(f"Unknown enrichment source: {enrichment_handler}")
handler = handler_map[enrichment_handler](**handler_config)
return pcoll | Enrichment(source_handler=handler, timeout=timeout)
View on GitHub (pinned to 12126d8942)
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'.
Example fix
// before (yaml) - type: Enrichment handler: FeastFeatureStore # after (shell) pip install 'feast[gcp]'
Defensive patterns
Strategy: validation
Validate before calling
import importlib.util
assert importlib.util.find_spec('feast') is not None, "Install with: pip install 'feast[gcp]'" Type guard
def feast_available() -> bool:
import importlib.util
return importlib.util.find_spec('feast') is not None Try / catch
try:
run_yaml_pipeline(spec)
except ValueError as e:
if "feast" in str(e):
install_or_fallback_to_bigquery_handler() Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Understand the failure class
Background: "X is not installed. Please install it with pip install Y": missing optional dependency errors — ImportError/ValueError raised when a library's optional extra was never installed — this error's family across 22 libraries.
Related errors
- Invalid feature store yaml file provided. Make sure the %s c
- langchain is required to use LangChainChunkerPlease install
- sentence-transformers is required to use HuggingfaceTextEmbe
- sentence-transformers is required to use HuggingfaceImageEmb
- Pillow is required to use HuggingfaceImageEmbeddings. Please
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/7a8c2b6a3b2300e0.
Report an issue: GitHub.