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

Not Supporting UPDATE SQL Statement #669

Open
ranjeetdarjee opened this issue Jan 28, 2025 · 1 comment
Open

Not Supporting UPDATE SQL Statement #669

ranjeetdarjee opened this issue Jan 28, 2025 · 1 comment
Labels
question Further information is requested

Comments

@ranjeetdarjee
Copy link

Describe the bug

  • UPDATE statement with FROM keyword or with the join is not readable by the sqllineage, could you please check and update this please. I'm sharing one sample code for the same.

SQL
Paste the SQL text here. For example:

UPDATE t1
FROM  test_db1.table1 t1
     ,test_db2.table2 t2
     
SET  Indicator = CASE WHEN Cde IN ('04','05','06') AND T_Code IS NOT NULL THEN 'Y'
                        ELSE NULL
                        END
WHERE t1.StsCde = t2.StsCde
AND t1.UnCde  = t2.T_Code
AND t2.t2_endDate <= '2024-05-31'
AND t2.eff_end_date  > '2024-05-31';

To Reproduce
Note here we refer to SQL provided in prior step as stored in a file named test.sql

  • if CLI (Command Line Interface): provide the command you're calling and the output.
    For example:
sqllineage -f test.sql --dialect=ansi
Statements(#): 1
Source Tables:
    <default>.foo
Target Tables:
    <default>.analyze
  • elif API (Application Programming Interface): provide the python code you're using and the output.
    For example:
from sqllineage.runner import LineageRunner
with open("test.sql") as f:
    sql = f.read()
result = LineageRunner(sql, dialect="ansi")
print(result.target_tables)
[Table: <default>.analyze]
  • elif Web UI (Web User Interface): provide the lineage graph which could be downloaded from the page, or screenshots if there're components other than the lineage graph that's related to this bug.

  • else: whatever other ways to reproduce this bug.

Expected behavior
A clear and concise description of what you expected to happen, and the output in accordance with the To Reproduce section.

Python version (available via python --version)

  • 3.8.17
  • 3.9.18
  • 3.10.13
  • 3.11.5
  • etc.

SQLLineage version (available via sqllineage --version):

  • 1.3.8
  • 1.4.7
  • etc.

Additional context
Add any other context about the problem here.

@ranjeetdarjee ranjeetdarjee added the bug Something isn't working label Jan 28, 2025
@reata
Copy link
Owner

reata commented Feb 7, 2025

Please update the To Reproduce (besides SQL, please add exception stack or incorrect result), Expected behavior and SQLLineage version section accordingly. Current input is not enough for debugging.

@reata reata added question Further information is requested and removed bug Something isn't working labels Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants