Skip to content

Commit 1abdb27

Browse files
author
grq
committed
README_cn.md
1 parent 69eae39 commit 1abdb27

2 files changed

Lines changed: 83 additions & 82 deletions

File tree

README.md

Lines changed: 1 addition & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,2 @@
11
# python_data_lineage
2-
Data lineage tools in python
3-
4-
## step 1 环境准备
5-
* 安装python3
6-
* 安装 java jdk1.8
7-
8-
## step 2 打开web服务
9-
切换到本项目widget目录,执行以下命令启动web服务:
10-
11-
`python -m http.server 8000`
12-
13-
浏览器内打开以下网址验证是否启动成功:http://localhost:8000/
14-
15-
注意:如果要修改8000端口,需要同时在dlineage.py里修改widget_server_url
16-
17-
## step 3 执行python脚本
18-
切换到本项目根目录,即dlineage.py所在目录,执行以下命令:
19-
20-
`python dlineage.py /f test.sql /graph`
21-
22-
此命令,会将test.sql进行血缘分析,并打开一个浏览器页面,图形化方式展示血缘分析结果。
23-
24-
dlineage.py 支持的命令参数说明:
25-
26-
/f: Optional, the full path to SQL file.
27-
28-
/d: Optional, the full path to the directory includes the SQL files.
29-
30-
/j: Optional, return the result including the join relation.
31-
32-
/s: Optional, simple output, ignore the intermediate results.
33-
34-
/topselectlist: Optional, simple output with top select results.
35-
36-
/withTemporaryTable: Optional, simple output with the temporary tables.
37-
38-
/i: Optional, the same as /s option, but will keep the resultset generated by the SQL function, this parameter will have the same effect as /s /topselectlist + keep resultset generated by the sql function.
39-
40-
/showResultSetTypes: Optional, simple output with specify resultset types, separate with commas, resultset types contains array, struct, result_of, cte, insert_select, update_select, merge_update, merge_insert, output, update_set pivot_table, unpivot_table, alias, rs, function, case_when
41-
42-
/if: Optional, keep all the intermediate resultset, but remove the resultset generated by the SQL function
43-
44-
/ic: Optional, ignore the coordinates in the output.
45-
46-
/lof: Option, link orphan column to the first table.
47-
48-
/traceView: Optional, only output the name of source tables and views, ignore all intermedidate data.
49-
50-
/text: Optional, this option is valid only /s is used, output the column dependency in text mode.
51-
52-
/json: Optional, print the json format output.
53-
54-
/tableLineage [/csv /delimiter]: Optional, output tabel level lineage.
55-
56-
/csv: Optional, output column level lineage in csv format.
57-
58-
/delimiter: Optional, the delimiter of output column level lineage in csv format.
59-
60-
/t: Option, set the database type.
61-
Support access,bigquery,couchbase,dax,db2,greenplum,hana,hive,impala,informix,mdx,mssql,
62-
sqlserver,mysql,netezza,odbc,openedge,oracle,postgresql,postgres,redshift,snowflake,
63-
sybase,teradata,soql,vertica the default value is oracle
64-
65-
/env: Optional, specify a metadata.json to get the database metadata information.
66-
67-
/transform: Optional, output the relation transform code.
68-
69-
/coor: Optional, output the relation transform coordinate, but not the code.
70-
71-
/defaultDatabase: Optional, specify the default schema.
72-
73-
/defaultSchema: Optional, specify the default schema.
74-
75-
/showImplicitSchema: Optional, show implicit schema.
76-
77-
/showConstant: Optional, show constant table.
78-
79-
/treatArgumentsInCountFunctionAsDirectDataflow: Optional, treat arguments in count function as direct dataflow.
80-
81-
/filterRelationTypes: Optional, support fdd, fdr, join, call, er, multiple relatoin types separated by commas
82-
83-
/graph 打开一个浏览器页面,图形化方式展示血缘分析结果
2+
Data lineage tools in python

README_cn.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
### 在Python中如何使用数据血缘分析工具?
2+
3+
## step 1 环境准备
4+
* 安装python3
5+
* 安装 java jdk1.8
6+
7+
## step 2 打开web服务
8+
切换到本项目widget目录,执行以下命令启动web服务:
9+
10+
`python -m http.server 8000`
11+
12+
浏览器内打开以下网址验证是否启动成功:http://localhost:8000/
13+
14+
注意:如果要修改8000端口,需要同时在dlineage.py里修改widget_server_url
15+
16+
## step 3 执行python脚本
17+
切换到本项目根目录,即dlineage.py所在目录,执行以下命令:
18+
19+
`python dlineage.py /f test.sql /graph`
20+
21+
此命令,会将test.sql进行血缘分析,并打开一个浏览器页面,图形化方式展示血缘分析结果。
22+
23+
dlineage.py 支持的命令参数说明:
24+
25+
/f: 可选, sql文件.
26+
27+
/d: 可选, 包含sql文件的文件夹路径.
28+
29+
/j: 可选, 返回包含join关系的结果.
30+
31+
/s: 可选, 简单输出,忽略中间结果.
32+
33+
/topselectlist: 可选, 简单输出,包含最顶端的输出结果.
34+
35+
/withTemporaryTable: 可选, 简单输出,包含临时表.
36+
37+
/i: 可选, 与/s选项相同,但将保留SQL函数生成的结果集,此参数将与/s/topselectlist+keep SQL函数生成结果集具有相同的效果。
38+
39+
/showResultSetTypes: 可选, 带有指定结果集类型的简单输出,用逗号分隔, 结果集类型有: array, struct, result_of, cte, insert_select, update_select, merge_update, merge_insert, output, update_set pivot_table, unpivot_table, alias, rs, function, case_when
40+
41+
/if: 可选, 保留所有中间结果集,但删除 SQL 函数生成的结果集。
42+
43+
/ic: 可选, 忽略输出中的坐标.
44+
45+
/lof: 必选, 将孤立列链接到第一个表.
46+
47+
/traceView: 可选,只输出源表和视图的名称,忽略所有中间数据.
48+
49+
/text: 可选, 如果只使用/s 选项,则在文本模式下输出列依赖项.
50+
51+
/json: 可选, 打印json格式输出.
52+
53+
/tableLineage [/csv /delimiter]: 可选, 输出表级血缘关系.
54+
55+
/csv: 可选, 输出csv格式的列一级的血缘关系.
56+
57+
/delimiter: 可选, 输出csv格式的分隔符.
58+
59+
/t: 必选, 指定数据库类型.
60+
支持 access,bigquery,couchbase,dax,db2,greenplum, gaussdb, hana,hive,impala,informix,mdx,mssql,
61+
sqlserver,mysql,netezza,odbc,openedge,oracle,postgresql,postgres,redshift,snowflake,
62+
sybase,teradata,soql,vertica the default value is oracle
63+
64+
/env: 可选, 指定一个 metadata.json 来获取数据库元数据信息.
65+
66+
/transform: 可选, 输出关系转换码.
67+
68+
/coor: 可选, 输出关系转换坐标,但不输出代码.
69+
70+
/defaultDatabase: 可选, 指定默认database.
71+
72+
/defaultSchema: 可选, 指定默认schema.
73+
74+
/showImplicitSchema: 可选, 显示间接schema.
75+
76+
/showConstant: 可选, 显示常量.
77+
78+
/treatArgumentsInCountFunctionAsDirectDataflow: 可选,将 count 函数中的参数视为直接数据流.
79+
80+
/filterRelationTypes: 可选, 过滤关系类型,支持 fdd,fdr,join,call,er,如果有多个关系类型用英文半角逗号分隔.
81+
82+
/graph: 可选, 打开一个浏览器页面,图形化方式展示血缘分析结果

0 commit comments

Comments
 (0)