This repository was archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
This repository was archived by the owner on Sep 12, 2024. It is now read-only.
[BUG] Error while fetching table metadata details #997
Copy link
Copy link
Closed
Labels
🐛 bugSomething isn't workingSomething isn't working🔗 connectorsDB, DW & third party connectorsDB, DW & third party connectors🛠️ backend
Milestone
Description
Describe the bug
While fetching the metadata from the GBQ, this is the error coming for one table which is changing the data connection status as broken.
Logs
This is the error traceback.
[2022-06-15 14:13:35,326: ERROR/ForkPoolWorker-1] Error in metadata prefetch.
Traceback (most recent call last):
File "/usr/src/app/chaos_genius/controllers/data_source_metadata_controller.py", line 146, in run_metadata_prefetch
_ = scan_db_and_save_table_info(
File "/usr/src/app/chaos_genius/controllers/data_source_metadata_controller.py", line 208, in scan_db_and_save_table_info
table_info = get_table_info(
File "/usr/src/app/chaos_genius/connectors/__init__.py", line 83, in get_table_info
table_info["columns"] = db_connection.get_columns(table_name, schema)
File "/usr/src/app/chaos_genius/connectors/base_db.py", line 141, in get_columns
db_columns = self.inspector.get_columns(
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/engine/reflection.py", line 497, in get_columns
col_defs = self.dialect.get_columns(
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy_bigquery/base.py", line 917, in get_columns
table = self._get_table(connection, table_name, schema)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy_bigquery/base.py", line 904, in _get_table
table = client.get_table(table_ref)
File "/usr/local/lib/python3.8/dist-packages/google/cloud/bigquery/client.py", line 1034, in get_table
api_response = self._call_api(
File "/usr/local/lib/python3.8/dist-packages/google/cloud/bigquery/client.py", line 782, in _call_api
return call()
File "/usr/local/lib/python3.8/dist-packages/google/api_core/retry.py", line 283, in retry_wrapped_func
return retry_target(
File "/usr/local/lib/python3.8/dist-packages/google/api_core/retry.py", line 190, in retry_target
return target()
File "/usr/local/lib/python3.8/dist-packages/google/cloud/_http/__init__.py", line 494, in api_request
raise exceptions.from_http_response(response)
google.api_core.exceptions.Forbidden: 403 GET https://bigquery.googleapis.com/bigquery/v2/projects/analytics/datasets/Table_Name/tables/Data?prettyPrint=false: Access Denied: Table analytics:Table_Name.Data: Permission bigquery.tables.get denied on table analytics:Table_Name.Data (or it may not exist).
[2022-06-15 14:13:35,335: INFO/ForkPoolWorker-1] Task chaos_genius.jobs.metadata_prefetch.fetch_data_source_schema[db5f3afc-65a8-45d7-96be-c724ee5eb0b3] succeeded in 18.015717508271337s: False
Metadata
Metadata
Assignees
Labels
🐛 bugSomething isn't workingSomething isn't working🔗 connectorsDB, DW & third party connectorsDB, DW & third party connectors🛠️ backend