In `bigquery.py`, I found that the base_query will...
# troubleshoot
f
In
bigquery.py
, I found that the base_query will be failed with
Syntax error: Missing whitespace between literal and alias
whenever the profiling is enabled. • It seems like {schema}.TABLES should be put into the angled apostraphes (``{schema}.__TABLES__``) because of BigQuery Syntax Rule. • Should I raise this point as a bug?
Copy code
@staticmethod
    def get_all_schema_tables_query(schema: str) -> str:
        base_query = (
            f"SELECT "
            f"table_id, "
            f"size_bytes, "
            f"last_modified_time, "
            f"row_count, "
            f"FROM {schema}.__TABLES__"
        )
        return base_query
P/s: Please take a look at the attached screenshot for more detail.
g
cc @dazzling-judge-80093 - this looks like a possible bigquery profiling bug?
d
and also, it should not profile
__TABLES__
system table. I will need to check how we pass in project_id,dataset and I think we might need to quote those
c
Hi @dazzling-judge-80093 sorry to jump in. i have same issue when ingesting bigquery to datahub. is it already resolved?
f
@chilly-spring-43918 I will create a PR to fix it soon.
c
@famous-florist-7218 thank you very much
h
@gray-shoe-75895 We are facing same issue, Any updates on PR & fix? @famous-florist-7218
f
@happy-twilight-91685 this issue has been fixed. Please upgrade your datahub version.
h
@famous-florist-7218 Which version 0.9? I'm using
v0.8.44
f
@happy-twilight-91685 since
v0.8.45
biquery-beta was introduced, it has many improvements including this bug-fixing. Just upgrade to the latest version
v0.9.3
. https://github.com/datahub-project/datahub/releases/tag/v0.8.45