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
>>> from sqllineage.runner import LineageRunner
>>> sql_1="""
... with unique_nicknames as (select nickname from nicknames group by nickname having count(distinct name) = 1)
... select name, min(replacements) as smallest_step, max(replacements) as largest_step from (
... select names.fname, [nicknames.name](http://nicknames.name/), count(*) as replacements from unique_nicknames join nicknames on nicknames.nickname = unique_nicknames.nickname join names on names.fname = nicknames.nickname group by names.fname, [nicknames.name](http://nicknames.name/)
... ) as replaceable group by name
... """
>>> sql_2="""
... select name, min(replacements) as smallest_step, max(replacements) as largest_step from (
... with unique_nicknames as (select nickname from nicknames group by nickname having count(distinct name) = 1)
... select names.fname, [nicknames.name](http://nicknames.name/), count(*) as replacements from unique_nicknames join nicknames on nicknames.nickname = unique_nicknames.nickname join names on names.fname = nicknames.nickname group by names.fname, [nicknames.name](http://nicknames.name/)
... ) as replaceable group by name
... """
>>> LineageRunner(sql=sql_1,dialect="redshift").source_tables
[Table: <default>.names, Table: <default>.nicknames]
>>> LineageRunner(sql=sql_2,dialect="redshift").source_tables
[Table: <default>.nicknames]
>>>
The text was updated successfully, but these errors were encountered:
with unique_nicknames as (select nickname from nicknames group by nickname havingcount(distinct name) =1)
select name, min(replacements) as smallest_step, max(replacements) as largest_step from (
selectnames.fname, nicknames.name, count(*) as replacements from unique_nicknames join nicknames onnicknames.nickname=unique_nicknames.nicknamejoin names onnames.fname=nicknames.nicknamegroup bynames.fname, nicknames.name
) as replaceable group by name;
select name, min(replacements) as smallest_step, max(replacements) as largest_step from (
with unique_nicknames as (select nickname from nicknames group by nickname havingcount(distinct name) =1)
selectnames.fname, nicknames.name, count(*) as replacements from unique_nicknames join nicknames onnicknames.nickname=unique_nicknames.nicknamejoin names onnames.fname=nicknames.nicknamegroup bynames.fname, nicknames.name
) as replaceable group by name;
Because I see markdown syntax like [nicknames.name](http://nicknames.name/) in your sql text and it won't parse.
If the SQL is as I pasted above, I can confirm this is a bug and ansi also suffers from the same issue. Looks like we are not handling CTE within subquery.
The text was updated successfully, but these errors were encountered: