Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1154,10 +1154,19 @@ def _parse_bigquery_source(

# Check if this is a direct BigQuery connection
if "GoogleBigQuery.Database" not in source_expression:
logger.debug(
"GoogleBigQuery.Database not found in source expression "
f"for datamodel: {datamodel_entity.name.root}, table: {table.name}"
)
return None

# Handle Value.NativeQuery with inline SQL
if BIGQUERY_QUERY_EXPRESSION_KW in source_expression:
logger.debug(
"Parsing BigQuery NativeQuery source expression "
f"through query parser: {source_expression}\nfor "
f"datamodel: {datamodel_entity.name.root}, table: {table.name}"
)
return self._parse_bigquery_query_source(source_expression)

logger.debug(f"Found GoogleBigQuery.Database in expression")
Expand All @@ -1170,7 +1179,10 @@ def _parse_bigquery_source(
)

if not name_matches:
logger.debug("No Name patterns found in BigQuery expression")
logger.debug(
"No Name patterns found in BigQuery expression for "
f"datamodel: {datamodel_entity.name.root}, table: {table.name}"
)
return None

# BigQuery structure: project -> dataset (Schema) -> table (Table/View)
Expand All @@ -1192,7 +1204,8 @@ def _parse_bigquery_source(
)
if not table_name:
logger.debug(
f"Parsing BigQuery source expression for powerbi table ({table.name}):: {source_expression}"
"Table name not found in Parsing BigQuery source expression for "
Comment thread
harshsoni2024 marked this conversation as resolved.
Resolved

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: Awkward phrasing in debug log message

The log message at line 1207 reads "Table name not found in Parsing BigQuery source expression" — the capitalized "Parsing" and overall phrasing is grammatically awkward. Consider rewording to something like "Table name not found when parsing BigQuery source expression".

Suggested fix:

logger.debug(
    "Table name not found when parsing BigQuery source expression for "
    f"datamodel: {datamodel_entity.name.root}, powerbi table ({table.name}): {source_expression}"
)

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

f"datamodel: {datamodel_entity.name.root}, powerbi table ({table.name}): {source_expression}"
)
if table_name:
return [{"database": project, "schema": dataset, "table": table_name}]
Expand Down
Loading