Replies: 4 comments
-
这是sqlfluff的锅 |
Beta Was this translation helpful? Give feedback.
0 replies
-
是不是改sqlfluff的配置可以处理 |
Beta Was this translation helpful? Give feedback.
0 replies
-
不是,它就不支持中文 |
Beta Was this translation helpful? Give feedback.
0 replies
-
insert into xxxxxxxxxx
select
T1.MONTH_ID '月账期',
T1.DAY_ID '日账期'
from
(
select
*
from
per_086_dwe.DWE_V_D_CUS_GRID_USER_INFO_J
where
MONTH_ID = '202405'
and DAY_ID = '29'
and COLLECTION_TYPE = 'STD'
and IS_MON_DEV = '1'
and IS_KD_RH = '1'
) T1 给中文别名加个引号可以正确解析。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1、报错信息:
c:\RPA_TEST>sqllineage -f sql.sql -l column
Traceback (most recent call last):
File "E:\anaconda\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "E:\anaconda\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "E:\anaconda\Scripts\sqllineage.exe_main.py", line 7, in
File "E:\anaconda\lib\site-packages\sqllineage\cli.py", line 125, in main
runner.print_column_lineage()
File "E:\anaconda\lib\site-packages\sqllineage\runner.py", line 172, in print_column_lineage
for path in self.get_column_lineage():
File "E:\anaconda\lib\site-packages\sqllineage\runner.py", line 26, in wrapper
self._eval()
File "E:\anaconda\lib\site-packages\sqllineage\runner.py", line 199, in _eval
stmt_holder = analyzer.analyze(stmt, session.metadata_provider)
File "E:\anaconda\lib\site-packages\sqllineage\core\parser\sqlfluff\analyzer.py", line 52, in analyze
statement_segments = self._list_specific_statement_segment(sql)
File "E:\anaconda\lib\site-packages\sqllineage\core\parser\sqlfluff\analyzer.py", line 92, in _list_specific_statement_segment
raise InvalidSyntaxException(
sqllineage.exceptions.InvalidSyntaxException: This SQL statement is unparsable, please check potential syntax error for SQL:
insert into xxxxxxxxxx
select
T1.MONTH_ID 月账期,
T1.DAY_ID 日账期
from
(
select
*
from
per_086_dwe.DWE_V_D_CUS_GRID_USER_INFO_J
where
MONTH_ID = '202405'
and DAY_ID = '29'
and COLLECTION_TYPE = 'STD'
and IS_MON_DEV = '1'
and IS_KD_RH = '1'
) T1
Unable to lex characters: '月账期,'
Unable to lex characters: '日账期'
Line 3, Position 22: Found unparsable section: '月账期,\n T1.DAY_ID 日账期'
2、英文别名正常
insert into xxxxxxxxxx
select
T1.MONTH_ID MONTH_ID,
T1.DAY_ID DAY_ID
from
(
select
*
from
per_086_dwe.DWE_V_D_CUS_GRID_USER_INFO_J
where
MONTH_ID = '202405'
and DAY_ID = '29'
and COLLECTION_TYPE = 'STD'
and IS_MON_DEV = '1'
and IS_KD_RH = '1'
) T1
c:\RPA_TEST>sqllineage -f sql.sql -l column
.xxxxxxxxxx.day_id <- t1.day_id
.xxxxxxxxxx.month_id <- t1.month_id
Beta Was this translation helpful? Give feedback.
All reactions