reata / sqllineage

SQL Lineage Analysis Tool powered by Python
MIT License
1.19k stars 215 forks source link

when I use merge into ,it reports this error #602

Open wentfar opened 2 months ago

wentfar commented 2 months ago

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 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):

Additional context Add any other context about the problem here.

reata commented 1 month ago

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.