You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
During BigQuery metadata ingestion from exported audit tables, the process fails with:
To Reproduce
Steps to reproduce the behaviour:
Execute a SQL CREATE AS SELECT statement with a comment that:
is located right before SELECT
starts with "#" (allowed symbol for comment blocks in BigQuery) and has no space after "#"
has a comma somewhere closer to the start of the comment
/*HERE IS A STANDARD COMMENT BLOCKTHIS WILL NOT BREAK sqllineage*/
CREATE OR REPLACE TABLE `foo.bar.trg_tbl`AS#This, comment will break sqllineageSELECT foo
-- this comment will not break sqllineage# this comment will not break sqllineage eitherFROM`foo.bar.src_tbl`
Have exported audit logs table prepared in BigQuery
Execute a BigQuery recipe with use_exported_bigquery_audit_metadata: true (version: 0.8.32.4)
Expected behavior
sql_lineage_parser_impl.py and sqllineage should strip even #-comments from SQL statement
Additional context
I've tried to parse the SQL statement from above in https://sqllineage.herokuapp.com/.
If comma is being placed too far or the comment section ends with a comma, then the statement is being parsed correctly.
If the comment section begins with "#" but has a space sign before the comment itself, then the statement is also being parsed correctly.
The only possible solution seems to be converting all "#" to "--" (the standard SQL comment symbol) as dealing with "#" itself might require asking sqllineage developers for some assistance.
The issue seems to be quite random. Unfortunately, we cannot control where developers will place their comments in BigQuery SQL and what symbols they'll use :(
The text was updated successfully, but these errors were encountered:
Describe the bug
During BigQuery metadata ingestion from exported audit tables, the process fails with:
To Reproduce
Steps to reproduce the behaviour:
use_exported_bigquery_audit_metadata: true
(version: 0.8.32.4)Expected behavior
sql_lineage_parser_impl.py and sqllineage should strip even #-comments from SQL statement
Additional context
I've tried to parse the SQL statement from above in https://sqllineage.herokuapp.com/.
If comma is being placed too far or the comment section ends with a comma, then the statement is being parsed correctly.
If the comment section begins with "#" but has a space sign before the comment itself, then the statement is also being parsed correctly.
The only possible solution seems to be converting all "#" to "--" (the standard SQL comment symbol) as dealing with "#" itself might require asking sqllineage developers for some assistance.
The issue seems to be quite random. Unfortunately, we cannot control where developers will place their comments in BigQuery SQL and what symbols they'll use :(
The text was updated successfully, but these errors were encountered: