Skip to content

1.5.7版本,这种SQL,无论方言hive,doris,mysql,ansi都不行 #758

@jacky1987

Description

@jacky1987

sqllineage -e "INSERT OVERWRITE TABLE DWS_EQP_CARRIER_D_F
SELECT
TIMEKEY
,STEP_ID -- 站点
,EQP_ID -- 线体
,B.PRODUCT_SPEC_NAME -- 型号
,CARRIER_ID -- 治具ID
,COUNT(OTP_RESULT) NUM -- 数量
,SUM(IF(OTP_RESULT = 'FAIL',1,0)) FAILNUM -- FAIL数量
,CREATED_TIME
,'TM20'
,NOW()
FROM
(SELECT
PANEL_ID -- 批次代码
,STEP_ID -- 站点
,EQP_ID -- 线体
,CARRIER_ID -- 治具ID
,GET_DATE_TIMEKEY(DATE_FORMAT(CREATED_TIME,'%Y%m%d%H%i%s')) TIMEKEY
,OTP_RESULT
, GET_HOUR_TIMEKEY(DATE_FORMAT(CREATED_TIME,'%Y%m%d%H%i%s')) CREATED_TIME
FROM
ODS_YMS_FT_PANEL_INFO_I
WHERE
STEP_ID IN ('AT100')
AND PANEL_ID IS NOT NULL ) A
LEFT JOIN
bdw_prod.DIM_PRODUCT B
ON A.PANEL_ID = B.PRODUCT_ID
GROUP BY
STEP_ID -- 站点
,EQP_ID -- 线体
,B.PRODUCT_SPEC_NAME -- 型号
,CARRIER_ID -- 治具ID
,TIMEKEY
,CREATED_TIME
ORDER BY
TIMEKEY" --dialect hive

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/networkx/classes/graph.py", line 2061, in bunch_iter
for n in nlist:
TypeError: 'Column' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/sqllineage", line 8, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqllineage/cli.py", line 134, in main
runner.print_table_lineage()
File "/usr/local/lib/python3.11/site-packages/sqllineage/runner.py", line 183, in print_table_lineage
print(str(self))
^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqllineage/runner.py", line 26, in wrapper
self._eval()
File "/usr/local/lib/python3.11/site-packages/sqllineage/runner.py", line 214, in _eval
self._sql_holder = SQLLineageHolder.of(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqllineage/core/holders.py", line 519, in of
len(ngo.retrieve_edges_by_vertex(unresolved_col, EdgeDirection.OUT))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqllineage/core/graph/networkx.py", line 88, in retrieve_edges_by_vertex
else self.graph.out_edges(vertex, data=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/networkx/classes/reportviews.py", line 1105, in call
return self.dataview(self, nbunch, data, default=default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/networkx/classes/reportviews.py", line 778, in init
nbunch = dict.fromkeys(viewer._graph.nbunch_iter(nbunch))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/networkx/classes/graph.py", line 2079, in bunch_iter
raise exc
networkx.exception.NetworkXError: Node otp_result is not in the graph.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions