当前位置:网站首页>Learn about data kinship JSON format design from sqlflow JSON format
Learn about data kinship JSON format design from sqlflow JSON format
2022-06-30 14:23:00 【mizuhokaga】
0.
Data kinship visualization is an excellent tool at present SQLFlow( Salmon data kinship Analyzer ) 了 . We can SQLFlow Of json Format to learn about data kinship json Format design .
- Are you hungry , Are you hungry? Metadata management data kinship json Format design
1. example
How to get SQLFlow Of json? Right click on the visualization canvas –》Download as json
With SQLFlow With Hive sample sql For example .
SELECT pageid, adid
FROM pageAds LATERAL VIEW explode(adid_list) adTable AS adid;
In order to see what we are saying paragraph by paragraph , At the end of the article there is a complete json.
1.1 Core overview
json Blood relationship is defined in sqlflow In this object , There is one field and two arrays
- dbvendor : What kind of database , Here is hive
- dbobjs: Nodes in the array , Every node is sqlflow In the canvas, there are pieces of tables
- relations: Relational arrays , Every relationship is sqlflow The lines in the canvas
"sqlflow": {
"dbvendor": "dbvhive",
"dbobjs": [],
"relations": []
}
1.2 dbobjs Array
dbobjs Array holds multiple node objects , The result of the node object is as follows . Each node object contains all the columns and coordinates of the table .
{
"id": "2",
"name": "pageAds",
"type": "table",
"columns": [
{
"id": "9",
"name": "adid_list",
"coordinates": [
{
"x": 3,
"y": 35,
"hashCode": "0"
},
{
"x": 3,
"y": 44,
"hashCode": "0"
}
]
},
{
"id": "13",
"name": "pageid",
"coordinates": [
{
"x": 2,
"y": 8,
"hashCode": "0"
},
{
"x": 2,
"y": 14,
"hashCode": "0"
}
]
}
],
"coordinates": [
{
"x": 3,
"y": 6,
"hashCode": "0"
},
{
"x": 3,
"y": 61,
"hashCode": "0"
}
]
}

json The binary coordinate groups of tables and columns in the are so convenient for the front-end to render the diagram . Tables and fields have their own numbers to facilitate the following relationships to locate their parent nodes
relations
relations Each relationship object in the has the most important target and sources Field . from relations We can also find sqlflow Of json Format and hive utilize hook The log format of field level blood relationship collected passively is basically similar .
{
"id": "101",
//sqlflow Several relationships defined by oneself
"type": "fdd",
"effectType": "select",
"target": {
"id": "14",
"column": "adid",
"parentId": "11",
"parentName": "RS-1",
"coordinates": [
{
"x": 2,
"y": 16,
"hashCode": "0"
},
{
"x": 2,
"y": 20,
"hashCode": "0"
}
]
},
"sources": [
{
"id": "8",
"column": "adid",
"parentId": "7",
"parentName": "adTable",
"coordinates": [
{
"x": 3,
"y": 57,
"hashCode": "0"
},
{
"x": 3,
"y": 61,
"hashCode": "0"
}
]
}
]
}


complete json
{
"code": 200,
"data": {
"mode": "global",
"summary": {
"schema": 0,
"process": 0,
"database": 0,
"view": 0,
"mostRelationTables": [
{
"table": "PAGEADS"
},
{
"table": "ADTABLE"
}
],
"column": 3,
"table": 2,
"relation": 3
},
"sqlflow": {
"dbvendor": "dbvhive",
"dbobjs": [
{
"id": "2",
"name": "pageAds",
"type": "table",
"columns": [
{
"id": "9",
"name": "adid_list",
"coordinates": [
{
"x": 3,
"y": 35,
"hashCode": "0"
},
{
"x": 3,
"y": 44,
"hashCode": "0"
}
]
},
{
"id": "13",
"name": "pageid",
"coordinates": [
{
"x": 2,
"y": 8,
"hashCode": "0"
},
{
"x": 2,
"y": 14,
"hashCode": "0"
}
]
}
],
"coordinates": [
{
"x": 3,
"y": 6,
"hashCode": "0"
},
{
"x": 3,
"y": 61,
"hashCode": "0"
}
]
},
{
"id": "7",
"name": "adTable",
"type": "table",
"columns": [
{
"id": "8",
"name": "adid",
"coordinates": [
{
"x": 3,
"y": 57,
"hashCode": "0"
},
{
"x": 3,
"y": 61,
"hashCode": "0"
}
]
}
],
"coordinates": [
{
"x": 3,
"y": 46,
"hashCode": "0"
},
{
"x": 3,
"y": 53,
"hashCode": "0"
}
]
},
{
"id": "11",
"name": "RS-1",
"type": "select_list",
"columns": [
{
"id": "12",
"name": "pageid",
"coordinates": [
{
"x": 2,
"y": 8,
"hashCode": "0"
},
{
"x": 2,
"y": 14,
"hashCode": "0"
}
]
},
{
"id": "14",
"name": "adid",
"coordinates": [
{
"x": 2,
"y": 16,
"hashCode": "0"
},
{
"x": 2,
"y": 20,
"hashCode": "0"
}
]
}
],
"coordinates": [
{
"x": 2,
"y": 8,
"hashCode": "0"
},
{
"x": 2,
"y": 20,
"hashCode": "0"
}
]
}
],
"relations": [
{
"id": "101",
"type": "fdd",
"effectType": "select",
"target": {
"id": "14",
"column": "adid",
"parentId": "11",
"parentName": "RS-1",
"coordinates": [
{
"x": 2,
"y": 16,
"hashCode": "0"
},
{
"x": 2,
"y": 20,
"hashCode": "0"
}
]
},
"sources": [
{
"id": "8",
"column": "adid",
"parentId": "7",
"parentName": "adTable",
"coordinates": [
{
"x": 3,
"y": 57,
"hashCode": "0"
},
{
"x": 3,
"y": 61,
"hashCode": "0"
}
]
}
]
},
{
"id": "102",
"type": "fdd",
"effectType": "select",
"target": {
"id": "12",
"column": "pageid",
"parentId": "11",
"parentName": "RS-1",
"coordinates": [
{
"x": 2,
"y": 8,
"hashCode": "0"
},
{
"x": 2,
"y": 14,
"hashCode": "0"
}
]
},
"sources": [
{
"id": "13",
"column": "pageid",
"parentId": "2",
"parentName": "pageAds",
"coordinates": [
{
"x": 2,
"y": 8,
"hashCode": "0"
},
{
"x": 2,
"y": 14,
"hashCode": "0"
}
]
}
]
},
{
"id": "103",
"type": "fdd",
"effectType": "select",
"target": {
"id": "8",
"column": "adid",
"parentId": "7",
"parentName": "adTable",
"coordinates": [
{
"x": 3,
"y": 57,
"hashCode": "0"
},
{
"x": 3,
"y": 61,
"hashCode": "0"
}
]
},
"sources": [
{
"id": "9",
"column": "adid_list",
"parentId": "2",
"parentName": "pageAds",
"coordinates": [
{
"x": 3,
"y": 35,
"hashCode": "0"
},
{
"x": 3,
"y": 44,
"hashCode": "0"
}
]
}
]
}
]
},
"graph": {
"elements": {
"tables": [
{
"columns": [
{
"height": 16,
"id": "n0::n0",
"label": {
"content": "pageid",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 13.96875,
"width": 59,
"x": 0,
"y": 0
},
"width": 160,
"x": 445,
"y": -59.49261
},
{
"height": 16,
"id": "n0::n1",
"label": {
"content": "adid",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 13.96875,
"width": 43,
"x": 0,
"y": 0
},
"width": 160,
"x": 445,
"y": -43.49261
}
],
"height": 57.96875,
"id": "n0",
"label": {
"content": "RS-1",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 17.96875,
"width": 162,
"x": 0,
"y": 0
},
"width": 162,
"x": 444,
"y": -81.46136
},
{
"columns": [
{
"height": 16,
"id": "n1::n0",
"label": {
"content": "adid_list",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 13.96875,
"width": 67,
"x": 0,
"y": 0
},
"width": 160,
"x": 1,
"y": -59.49261
},
{
"height": 16,
"id": "n1::n1",
"label": {
"content": "pageid",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 13.96875,
"width": 59,
"x": 0,
"y": 0
},
"width": 160,
"x": 1,
"y": -43.49261
}
],
"height": 57.96875,
"id": "n1",
"label": {
"content": "pageAds",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 17.96875,
"width": 162,
"x": 0,
"y": 0
},
"width": 162,
"x": 0,
"y": -81.46136
},
{
"columns": [
{
"height": 16,
"id": "n2::n0",
"label": {
"content": "adid",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 13.96875,
"width": 43,
"x": 0,
"y": 0
},
"width": 160,
"x": 223,
"y": -30.000149
}
],
"height": 41.96875,
"id": "n2",
"label": {
"content": "adTable",
"fontFamily": "Segoe UI Symbol",
"fontSize": "12",
"height": 17.96875,
"width": 162,
"x": 0,
"y": 0
},
"width": 162,
"x": 222,
"y": -51.9689
}
],
"edges": [
{
"id": "e0",
"sourceId": "n1::n0",
"targetId": "n2::n0"
},
{
"id": "e1",
"sourceId": "n2::n0",
"targetId": "n0::n1"
},
{
"id": "e2",
"sourceId": "n1::n1",
"targetId": "n0::n0"
}
]
},
"tooltip": {
},
"relationIdMap": {
"e0": "fdd",
"e1": "fdd",
"e2": "fdd"
},
"listIdMap": {
"n0": [
"11"
],
"n0::n0": [
"12"
],
"n0::n1": [
"14"
],
"n1": [
"2"
],
"n1::n0": [
"9"
],
"n1::n1": [
"13"
],
"n2": [
"7"
],
"n2::n0": [
"8"
]
}
}
},
"sessionId": "a91895aadcb9d674e7d3edd5ddd12d4fefcda4ff797881d3b4823fe1ec9ff367_1633745113743"
}
边栏推荐
- Problem: wechat developer tool visitor mode cannot use this function
- Error on datetime when importing SQL file from MySQL
- The programming competition is coming! B station surrounding, senior members and other good gifts to you!
- [redis series] redis learning 16. Redis Dictionary (map) and its core coding structure
- Data recovery software easyrecovery15 Download
- Calculates the length of the last word in a string, separated by spaces
- numpy 创建空数组 data = np.empty(shape=[1, 64,64,3])
- 提权扫描工具
- go channel && select
- Solve the error in my QT_ thread_ global_ End(): 3 threads didn't exit
猜你喜欢

KnightCTF WEB

Fastcgi CGI shallow understanding

MFQE 2.0: A New Approach for Multi-FrameQuality Enhancement on Compressed Video

Summary of use of laravel DCAT admin

Lifting scanning tool

This editor will open source soon!

Google Earth Engine(GEE)——将字符串的转化为数字并且应用于时间搜索( ee.Date.fromYMD)

编程实战赛来啦!B站周边、高级会员等好礼送你啦!

I love network security for new recruitment assessment

Error on datetime when importing SQL file from MySQL
随机推荐
深入理解.Net中的线程同步之构造模式(二)内核模式4.内核模式构造物的总结
2021 geek challenge Web
(8) JMeter component detailed once only controller
notepad正则删除关键词所在行
[scientific research data processing] [practice] frequency analysis chart of category variables, distribution chart of numerical variables and normality test (including lognormal)
Numpy creates an empty array data = np empty(shape=[1, 64,64,3])
想请教一下,我在佛山,到哪里开户比较好?手机开户是安全么?
[redis series] redis learning 16. Redis Dictionary (map) and its core coding structure
On simple code crawling Youdao translation_ 0's problem (to be solved)
DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703
Thoughts on the security of a PHP file name regular verification
Solution cannot use a scalar value as an array
Three uses of golang underscores
Je suis à Foshan, où puis - je ouvrir un compte? L'ouverture d'un compte par téléphone mobile est - elle sécurisée?
The first three passes of sqli Labs
Rpm2rpm packaging steps
Thinkphp5 log file contains trick
PHP reverses scenarios based on code and skillfully uses debug_ backtrace()
我想问一下招商证券怎么开户?通过链接办理股票开户安全吗
深入理解.Net中的线程同步之构造模式(二)内核模式2.内核模式构造物Semaphone