{"record":{"id":"282dd01acbcac005","repo":"apache/beam","slug":"gcp-bigtable-cluster-s-s-s-not-found","errorCode":null,"errorMessage":"GCP BigTable cluster `%s:%s:%s` not found.","messagePattern":"GCP BigTable cluster `(.+?):(.+?):(.+?)` not found\\.","errorType":"exception","errorClass":"NotFound","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py","lineNumber":149,"sourceCode":"            if self._include_timestamp:\n              response_dict[cf_id][col_id.decode(self._encoding)] = [\n                  (v.value.decode(self._encoding), v.timestamp) for v in col_v\n              ]\n            else:\n              response_dict[cf_id][col_id.decode(\n                  self._encoding)] = col_v[0].value.decode(self._encoding)\n      elif self._exception_level == ExceptionLevel.WARN:\n        _LOGGER.warning(\n            'no matching row found for row_key: %s '\n            'with row_filter: %s' % (row_key_str, self._row_filter))\n      elif self._exception_level == ExceptionLevel.RAISE:\n        raise ValueError(\n            'no matching row found for row_key: %s '\n            'with row_filter=%s' % (row_key_str, self._row_filter))\n    except KeyError:\n      raise KeyError('row_key %s not found in input PCollection.' % row_key_str)\n    except NotFound:\n      raise NotFound(\n          'GCP BigTable cluster `%s:%s:%s` not found.' %\n          (self._project_id, self._instance_id, self._table_id))\n    except Exception as e:\n      raise e\n\n    return request, beam.Row(**response_dict)\n\n  def __exit__(self, exc_type, exc_val, exc_tb):\n    \"\"\"Clean the instantiated BigTable client.\"\"\"\n    self.client = None\n    self.instance = None\n    self._table = None\n\n  def get_cache_key(self, request: beam.Row) -> str:\n    \"\"\"Returns a string formatted with row key since it is unique to\n    a request made to `Bigtable`.\"\"\"\n    if self._row_key_fn:\n      return \"row_key: %s\" % str(self._row_key_fn(request))","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py#L131-L167","documentation":"The BigTable enrichment handler catches google.cloud.bigtable NotFound and re-raises it with the full resource path `project:instance:table`, indicating Bigtable returned that the table (or its instance/cluster) does not exist or is not accessible.","triggerScenarios":"Calling BigTableEnrichmentHandler.__call__ where self._project_id/_instance_id/_table_id point to a nonexistent or deleted table/instance, or the caller lacks permission so Bigtable reports NotFound.","commonSituations":"Typos in instance/table IDs; running against the wrong project; the table was deleted or not yet created in a new environment; cross-project access without correct credentials.","solutions":["Verify the project/instance/table IDs exist via `gcloud bigtable instances tables list`","Check credentials have bigtable.tables.readAccess on the target table","Recreate the table if it was deleted, or point the handler at the right environment"],"exampleFix":"// before\nBigTableEnrichmentHandler(project_id='proj', instance_id='prod-inst', table_id='enrich')\n// after\nBigTableEnrichmentHandler(project_id='proj', instance_id='dev-inst', table_id='enrich')  # table verified to exist","handlingStrategy":"try-catch","validationCode":"from google.cloud import bigtable\nclient = bigtable.Client(project=project_id)\ninst = client.instance(instance_id)\nif not inst.exists():\n    raise ValueError(f'instance {instance_id} missing')\nif not inst.table(table_id).exists():\n    raise ValueError(f'table {table_id} missing')","typeGuard":null,"tryCatchPattern":"try:\n    enriched = rows | Enrichment(handler)\nexcept NotFound as e:\n    log.error('verify project:instance:table exists and credentials have access: %s', e)\n    raise","preventionTips":["Verify instance/table existence before launching the pipeline","Use environment-specific config for project/instance/table IDs","Grant bigtable reader permissions to the pipeline service account"],"tags":["python","apache-beam","bigtable","gcp","not-found"],"backgroundTag":"resource-not-found","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"}