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
2024-03-21 09:36:17.221 pid=590 MainThread run_id=998b863b-7a77-44c4-b74f-72e621b1fe19 ERROR __main__: Lineage for task delivery_etl.delivery_gp_rep_supply_rep_supply_finance_pivoted: FAIL
Traceback (most recent call last):
File "/place/sandbox-data/tasks/1/4/2232947541/mounted_arcadia/taxi/dmp/dwh/services/meta_etl/meta_etl/layer/yt/import_meta/dmp/collect_column_lineage_sql/impl.py", line 58, in get_lineage_by_sql
paths = get_lineage_with_timeout(prepare_sql(row['combined_query']))
File "/place/sandbox-data/tasks/1/4/2232947541/mounted_arcadia/taxi/dmp/dwh/libraries/column_lineage/column_lineage/collect_column_lineage_sql/impl.py", line 37, in new_f
result = f(*args, **kwargs)
File "/place/sandbox-data/tasks/1/4/2232947541/mounted_arcadia/taxi/dmp/dwh/libraries/column_lineage/column_lineage/collect_column_lineage_sql/impl.py", line 121, in get_lineage_with_timeout
return _get_lineage(sql)
File "/place/sandbox-data/tasks/1/4/2232947541/mounted_arcadia/taxi/dmp/dwh/libraries/column_lineage/column_lineage/collect_column_lineage_sql/impl.py", line 129, in _get_lineage
for path in lr.get_column_lineage(False, False):
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/runner.py", line 26, in wrapper
self._eval()
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/runner.py", line 199, in _eval
stmt_holder = analyzer.analyze(stmt, session.metadata_provider)
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/analyzer.py", line 58, in analyze
lineage_holder = extractor.extract(
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/extractors/create_insert.py", line 45, in extract
holder |= self.delegate_to_select(segment, holder)
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/extractors/create_insert.py", line 138, in delegate_to_select
return self.delegate_to(
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/extractors/base.py", line 206, in delegate_to
return extractor_cls(self.dialect, self.metadata_provider).extract(
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/extractors/select.py", line 46, in extract
for sq in self.list_subquery(segment):
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/extractors/base.py", line 84, in list_subquery
result = cls._parse_subquery(list_subqueries(segment))
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/utils.py", line 183, in list_subqueries
subquery += list_subqueries(from_expression_element)
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/utils.py", line 154, in list_subqueries
as_segment, target = extract_as_and_target_segment(segment)
File "/opt/dmp/toxenvs/py3/lib/python3.9/site-packages/sqllineage/core/parser/sqlfluff/utils.py", line 229, in extract_as_and_target_segment
target = sublist[0] if is_subquery(sublist[0]) else sublist[0].segments[0]
IndexError: tuple index out of range
Expected behavior
A clear and concise description of what you expected to happen, and the output in accordance with the To Reproduce section.
Parsing column lineage from lateral subquery is another story then. <default>.b.f1<default>.b.f2 and <default>.b.f3 here are less desirable but requires further effort.
Among the three, <default>.b.f1 comes from constant values, we have #480 to track that.
Describe the bug
LATERAL with VALUES doesn't work
SQL
Paste the SQL text here. For example:
To Reproduce
Note here we refer to SQL provided in prior step as stored in a file named
test.sql
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
)SQLLineage version (available via
sqllineage --version
):The text was updated successfully, but these errors were encountered: