-
Notifications
You must be signed in to change notification settings - Fork 272
Closed
Labels
enhancementNew feature or requestNew feature or requestparsersomething that requires a strict/validating SQL parsersomething that requires a strict/validating SQL parser
Description
Describe the bug
- No dialect parameters are normal. Use Hive dialect will error.
SQL
Paste the SQL text here. For example:
INSERT OVERWRITE table dw.dim_dict partition (dt)
select get_json_object(replace(t.id, '$', ''), '$.oid') as id,
t.industry_code,
t.industry,
t.sec_industry_code,
t.sec_industry,
t.type,
t.version,
current_date as dt
from (select json_tuple(line, '_id', 'industryCode', 'industry', 'secIndustryCode', 'secIndustry', 'type', 'version')
as (id, industry_code, industry, sec_industry_code, sec_industry, type, version)
from default.tmp_json) t;To Reproduce
# -*- coding: utf-8 -*-
from sqllineage.runner import LineageRunner
def test_create_as():
sql = """
INSERT OVERWRITE table dw.dim_dict partition (dt)
select get_json_object(replace(t.id, '$', ''), '$.oid') as id,
t.industry_code,
t.industry,
t.sec_industry_code,
t.sec_industry,
t.type,
t.version,
current_date as dt
from (select json_tuple(line, '_id', 'industryCode', 'industry', 'secIndustryCode', 'secIndustry', 'type', 'version')
as (id, industry_code, industry, sec_industry_code, sec_industry, type, version)
from default.tmp_json) t;
"""
# result = LineageRunner(sql)
result = LineageRunner(sql, 'hive')
result.print_column_lineage()
print(result.source_tables)
print(result.target_tables)
if __name__ == "__main__":
test_create_as()Line 11, Position 18: Found unparsable section: 'as (id, industry_code, industry, sec_ind...'
Python version (available via python --version)
- 3.10.11
SQLLineage version (available via sqllineage --version):
- 1.4.8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestparsersomething that requires a strict/validating SQL parsersomething that requires a strict/validating SQL parser