-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Source Table for MERGE statement when UNION involved in source subquery #406
Comments
error sql: correct sql: there is something wrong with the "as", i dont konw why |
This happens only with default non-validating dialect, where sqlparse defines FILE_TYPE as a builtin data type, thus not allowed as alias name. Can you try switch to ansi dialect? In the long run, we will deprecate non-validating support. |
您好,邮件已收到,祝您天天好心情!
|
Yes , LineageRunner(sql, dialect="ansi") solved this problem. thank you. But there are another question : "LineageRunner(sql)" is ok to work with sql like below ,but "LineageRunner(sql, dialect="ansi")" not, merge into tb_report_risk_day t using ( its seems another error when using dialect="ansi" to do with "union all" : |
Can you try upgrading sqllineage to v1.4.5? I believe this is already fixed. |
LineageRunner(sql=veryfy_sql) LineageRunner(sql=veryfy_sql, dialect="ansi") LineageRunner方言模式没有报错,但是解析错误 == |
I can this is a bug that we need to fix. This is related to UNION ALL in source subquery. |
I did some research and this test case can be simplified to SELECT *
FROM (SELECT *
FROM foo
UNION ALL
SELECT *
FROM bar) s1
CROSS JOIN baz where ANSI dialect still has problem identifying all source table correctly, it only recognizes baz. update: it's still only triggered with merge |
version: sqllineage 1.4.2
when i use LineageRunner to parse sql below, it turned out error like:"return name.strip("`").strip('"').strip("'") AttributeError: 'NoneType' object has no attribute 'strip'":
create or replace view scn.vwn as
SELECT 1 as file_type
FROM scn.tbn
LineageRunner parse error
The text was updated successfully, but these errors were encountered: