apache/beam · error · ImportError
Bigquery dependencies are not installed.
Error message
Bigquery dependencies are not installed.
What it means
perf_analysis_utils.get_existing_issues_data queries BigQuery for previously filed GitHub issues about a test+metric regression. The google-cloud-bigquery import may be None when dependencies are missing, in which case it raises ImportError before creating the client.
Solutions
- pip install 'apache-beam[gcp]' to pull in google-cloud-bigquery
- Or pip install google-cloud-bigquery directly
- Run the analysis script inside the Beam load-test container image that includes GCP extras
Example fix
// before pip install apache-beam==2.xx.0 // after pip install 'apache-beam[gcp]'
Defensive patterns
Strategy: validation
Validate before calling
import importlib.util
if importlib.util.find_spec('google.cloud.bigquery') is None:
raise SystemExit("BigQuery missing: pip install 'apache-beam[gcp]'") Type guard
def has_bigquery() -> bool:
import importlib.util
return importlib.util.find_spec('google.cloud.bigquery') is not None Try / catch
try:
issues = get_existing_issues_data(test_name, metric_name)
except ImportError as e:
if 'Bigquery dependencies are not installed' in str(e):
logging.error("Install: pip install 'apache-beam[gcp]'")
issues = None
else:
raise Prevention
- Always install apache-beam[gcp] for anything touching google.cloud.*
- Probe for the bigquery module at script start and fail fast with an actionable message
- Document GCP extras in the analysis job's README/requirements
When it happens
Trigger: Calling run_change_point_analysis (which calls get_existing_issues_data) in a Python environment without google-cloud-bigquery installed (Beam installed without the [gcp] extra).
Common situations: Local dev runs of the change-point analysis without GCP deps; lightweight CI images; post-processing load-test results on a machine with a bare apache-beam install.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Bigquery dependencies are not installed.
- A BigQuery table or a query must be specified
- Azure dependencies are not installed. Unable to run.
- BigQuery source must be split before being read
- BigQuery storage source must be split before being read
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/70654f96b6df19f8.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py:126
def is_change_point_in_valid_window(
num_runs_in_change_point_window: int, latest_change_point_run: int) -> bool:
return num_runs_in_change_point_window > latest_change_point_run
def get_existing_issues_data(table_name: str) -> Optional[pd.DataFrame]:
"""
Finds the most recent GitHub issue created for the test_name.
If no table found with name=test_name, return (None, None)
else return latest created issue_number along with
"""
query = f"""
SELECT * FROM {constants._BQ_PROJECT_NAME}.{constants._BQ_DATASET}.{table_name}
ORDER BY {constants._ISSUE_CREATION_TIMESTAMP_LABEL} DESC
LIMIT 10
"""
try:
if bigquery is None:
raise ImportError('Bigquery dependencies are not installed.')
client = bigquery.Client()
query_job = client.query(query=query)
existing_issue_data = query_job.result().to_dataframe()
except exceptions.NotFound:
# If no table found, that means this is first performance regression
# on the current test+metric.
return None
return existing_issue_data
def is_sibling_change_point(
previous_change_point_timestamps: list[pd.Timestamp],
change_point_index: int,
timestamps: list[pd.Timestamp],
min_runs_between_change_points: int,
test_id: str,
) -> bool:
"""View on GitHub (pinned to 12126d8942)