sqlparser / python_data_lineage

Data lineage tools in python
13 stars 2 forks source link

有count函数的字段没列出来 #2

Open wangxn52 opened 1 month ago

wangxn52 commented 1 month ago

SQL: insert into xxxxxxxxxxxxxxx select NVL (area_name, '全省'), count( distinct case when jc_fir_lvl_svctype = '移网' and is_iot = '0' and is_mon_dev = '1' then user_id end ) + count( distinct case when jc_fir_lvl_svctype = '宽带' and is_iot = '0' and is_mon_dev = '1' then user_id end ) 发展量, count( distinct case when jc_fir_lvl_svctype = '移网' and is_iot = '0' and is_mon_dev = '1' then user_id end ) 移网发展量, count( distinct case when jc_fir_lvl_svctype = '宽带' and is_iot = '0' and is_mon_dev = '1' then user_id end ) 宽带发展量 from PER_086_DWE.DWE_V_D_CUS_GRID_USER_INFO_Z where month_id = '202405' and DAY_ID = '29' and SCENE_2ND in ('城区直销', '农村直销') and SCENE_TYPE <> '政企' and collection_type = 'HQ' group by rollup (area_name)

输出: c:\RPA_TEST\python_data_lineage-main>python dlineage.py /t mysql /text /s /f ..\test.sql ..\test.sql is not a text file. NVL (area_name, '全省') depends on: PER_086_DWE.DWE_V_D_CUS_GRID_USER_INFO_Z.area_name

liaowuhen2 commented 1 month ago

需要加一个参数:/treatArgumentsInCountFunctionAsDirectDataflow image