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

Support subquery in VALUES clause #432

Closed
entilo opened this issue Aug 16, 2023 · 3 comments · Fixed by #438
Closed

Support subquery in VALUES clause #432

entilo opened this issue Aug 16, 2023 · 3 comments · Fixed by #438
Labels
enhancement New feature or request

Comments

@entilo
Copy link

entilo commented Aug 16, 2023

from sqllineage.runner import LineageRunner

veryfy_sql= "INSERT INTO taba (a1, b1) VALUES (1,(SELECT max(bb) FROM tabb ));"
analysis_result = LineageRunner(sql=veryfy_sql, dialect="ansi")
logging.info(f'source_tables: {analysis_result.source_tables}')

as mentioned above,sourcetables is empty,is this need to be fixed?

@entilo
Copy link
Author

entilo commented Aug 16, 2023

sqllineage version is 1.4.5

@reata
Copy link
Owner

reata commented Aug 16, 2023

This is the first time I saw a SQL with subquery in VALUES clause. Never even imagine this is allowed. So it's only natural that we don't have analyzing logic targeting this. We can add support for it. This should be an easy one.

By the way, can you share the actual SQL dialect/database that you're running this SQL with?

@reata reata changed the title insert into sql verify error Support subquery in VALUES clause Aug 16, 2023
@entilo
Copy link
Author

entilo commented Aug 16, 2023 via email

@reata reata added the enhancement New feature or request label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants