{"record":{"id":"df13634f8eca6478","repo":"apache/beam","slug":"google-cloud-bigquery-storage-is-required-for","errorCode":null,"errorMessage":"google-cloud-bigquery-storage is required for ReadBigQueryChangeHistory. Install it with: pip install google-cloud-bigquery-storage","messagePattern":"google-cloud-bigquery-storage is required for ReadBigQueryChangeHistory\\. Install it with: pip install google-cloud-bigquery-storage","errorType":"validation","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/io/gcp/bigquery_change_history.py","lineNumber":1205,"sourceCode":"      table: str,\n      poll_interval_sec: float = 60,\n      start_time: Optional[float] = None,\n      stop_time: Optional[float] = None,\n      change_function: str = 'APPENDS',\n      buffer_sec: float = 10,\n      project: Optional[str] = None,\n      temp_dataset: Optional[str] = None,\n      location: Optional[str] = None,\n      change_type_column: str = 'change_type',\n      change_timestamp_column: str = 'change_timestamp',\n      columns: Optional[list[str]] = None,\n      row_filter: Optional[str] = None,\n      batch_arrow_read: bool = True,\n      max_split_rounds: int = 1,\n      reshuffle_decompress: bool = True) -> None:\n    super().__init__()\n    if bq_storage is None:\n      raise ImportError(\n          'google-cloud-bigquery-storage is required for '\n          'ReadBigQueryChangeHistory. Install it with: '\n          'pip install google-cloud-bigquery-storage')\n    if pyarrow is None:\n      raise ImportError(\n          'pyarrow is required for ReadBigQueryChangeHistory. '\n          'Install it with: pip install pyarrow')\n    if change_function not in ('CHANGES', 'APPENDS'):\n      raise ValueError(\n          f\"change_function must be 'CHANGES' or 'APPENDS', \"\n          f\"got '{change_function}'\")\n    if poll_interval_sec < 15:\n      raise ValueError(\n          f'poll_interval_sec must be >= 15, got {poll_interval_sec}')\n    if buffer_sec < 0:\n      raise ValueError(f'buffer_sec must be >= 0, got {buffer_sec}')\n    self._table = table\n    self._poll_interval_sec = poll_interval_sec","sourceCodeStart":1187,"sourceCodeEnd":1223,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/io/gcp/bigquery_change_history.py#L1187-L1223","documentation":"ReadBigQueryChangeHistory depends on the google-cloud-bigquery-storage package to read rows via the BigQuery Storage Read API. The module-level import failed (package not installed), so __init__ raises ImportError with the exact pip install command. The transform cannot function without this dependency.","triggerScenarios":"Constructing ReadFromBigQueryChangeHistory(...) in an environment where google-cloud-bigquery-storage is not installed (the module-level 'bq_storage' import is None), e.g. a minimal Beam install without GCP extras.","commonSituations":"Deploying to runners (Dataflow, Flink) where extra dependencies were not bundled; local venv created with 'pip install apache-beam' without the 'gcp' extra; dependency resolution removed the package in a constrained environment.","solutions":["Run: pip install google-cloud-bigquery-storage","Install the full GCP extras: pip install 'apache-beam[gcp]'","If deploying to Dataflow, add the package to setup.py install_requires / requirements.txt so it is staged with the job."],"exampleFix":"// before\npip install apache-beam\n// after\npip install 'apache-beam[gcp]'","handlingStrategy":"fallback","validationCode":"try:\n    import google.cloud.bigquery_storage as bq_storage\nexcept ImportError:\n    raise SystemExit(\"pip install 'apache-beam[gcp]' or pip install google-cloud-bigquery-storage\")","typeGuard":null,"tryCatchPattern":"try:\n    transform = ReadFromBigQueryChangeHistory(...)\nexcept ImportError as e:\n    log.error(\"install missing dependency: %s\", e)","preventionTips":["Install apache-beam with the [gcp] extra in every environment (local, CI, runner)","Declare google-cloud-bigquery-storage in setup.py/requirements.txt so it is staged on Dataflow","Verify container images include GCP dependencies before deploying"],"tags":["python","apache-beam","bigquery","dependency","import"],"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-14T16:17:12.679Z"}