Skip to content
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

Source table name not parsed in query #662

Open
soheilmoattar opened this issue Nov 18, 2024 · 0 comments
Open

Source table name not parsed in query #662

soheilmoattar opened this issue Nov 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@soheilmoattar
Copy link

Describe the bug
The result does not return the source table.

SQL

DROP TABLE IF EXISTS table_b;

create table table_b as

SELECT explode(sequence(to_date((select min(balance_date) FROM table_a)),
to_date((select max(balance_date) from table_a)), interval 1 day)) as date;

To Reproduce

For example:

from sqllineage.runner import LineageRunner
with open("test.sql") as f:
    sql = f.read()
result = LineageRunner(sql, dialect="sparksql")
print(result)

**Result
table_a should be returned as source table, but nothing is returned. Also tried with ansi dialect but i got the same result.

Source Tables:

Target Tables:
    <default>.table_b

Expected behavior

Source Tables:
     <default>.table_a
Target Tables:
    <default>.table_b

Python version (available via python --version)

  • 3.10.14

SQLLineage version (available via sqllineage --version):

  • 1.5.3
@soheilmoattar soheilmoattar added the bug Something isn't working label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant