Describe the bug
root@VM-0-10-centos ym]# sqllineage -f amdata-a.sql -l column
Traceback (most recent call last):
File "/usr/local/bin/sqllineage", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/sqllineage/cli.py", line 84, in main
runner.print_column_lineage()
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 159, in print_column_lineage
for path in self.get_column_lineage():
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 22, in wrapper
self._eval()
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 179, in _eval
self._stmt_holders = [LineageAnalyzer().analyze(stmt) for stmt in self._stmt]
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 179, in
self._stmt_holders = [LineageAnalyzer().analyze(stmt) for stmt in self._stmt]
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/analyzer.py", line 60, in analyze
self._extract_from_dml(stmt, AnalyzerContext())
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/analyzer.py", line 135, in _extract_from_dml
next_handler.handle(sub_token, holder)
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/handlers/base.py", line 39, in handle
self._handle(token, holder)
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/handlers/target.py", line 47, in _handle
% (type(token).name, token)
sqllineage.exceptions.SQLLineageException: An Identifier is expected, got IdentifierList[value: PRTFL_FUL_NM = TRIM(BB.FD_PROD_FULL_NAME),
SQL
Paste the SQL text here. For example:
insert into analyze select * from foo;
To ReproduceNote 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:
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.
Please provide the correct SQL and sqllineage version according to the issue template. Currently it does not provide any useful information to help us start debugging.
Describe the bug root@VM-0-10-centos ym]# sqllineage -f amdata-a.sql -l column Traceback (most recent call last): File "/usr/local/bin/sqllineage", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/sqllineage/cli.py", line 84, in main
runner.print_column_lineage()
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 159, in print_column_lineage
for path in self.get_column_lineage():
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 22, in wrapper
self._eval()
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 179, in _eval
self._stmt_holders = [LineageAnalyzer().analyze(stmt) for stmt in self._stmt]
File "/usr/local/lib/python3.6/site-packages/sqllineage/runner.py", line 179, in
self._stmt_holders = [LineageAnalyzer().analyze(stmt) for stmt in self._stmt]
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/analyzer.py", line 60, in analyze
self._extract_from_dml(stmt, AnalyzerContext())
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/analyzer.py", line 135, in _extract_from_dml
next_handler.handle(sub_token, holder)
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/handlers/base.py", line 39, in handle
self._handle(token, holder)
File "/usr/local/lib/python3.6/site-packages/sqllineage/core/handlers/target.py", line 47, in _handle
% (type(token).name, token)
sqllineage.exceptions.SQLLineageException: An Identifier is expected, got IdentifierList[value: PRTFL_FUL_NM = TRIM(BB.FD_PROD_FULL_NAME),
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
if
CLI (Command Line Interface): provide the command you're calling and the output. For example:elif
API (Application Programming Interface): provide the python code you're using and the output. For example: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
)SQLLineage version (available via
sqllineage --version
):Additional context Add any other context about the problem here.