当前位置:网站首页>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"
}
边栏推荐
- Summary of FTP network protocol learning
- [geek challenge 2019] PHP problem solving record
- Mysql database foundation: stored procedures and functions
- 【Kubernetes系列】K8s设置MySQL8大小写不敏感
- Introduction to reverse commissioning - VA and RVA conversion in PE 04/07
- Small exercise of process and signal
- 數據恢複軟件EasyRecovery15下載
- 【科研数据处理】[实践]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)
- "Persistent diseases" that cannot be solved in IM application development
- 【观察】智能产业加速,为何AI算力要先行?
猜你喜欢

What is erdma as illustrated by Coptic cartoon?

Realize a simple LAN communication (similar to feiqiu)

Defi "where does the money come from"? A problem that most people don't understand
![[Title brushing] coco, who likes bananas](/img/66/5646ac7e644025ccaee7c17f62ce17.png)
[Title brushing] coco, who likes bananas

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

Tencent two sides: @bean and @component are used on the same class. What happens?

I love network security for new recruitment assessment

Getting started with shell Basics
![[observation] as the intelligent industry accelerates, why should AI computing power take the lead?](/img/61/b446a616e86247507c27390505dc6b.jpg)
[observation] as the intelligent industry accelerates, why should AI computing power take the lead?

Heavyweight: the domestic ide was released, developed by Alibaba, and is completely open source!
随机推荐
The programming competition is coming! B station surrounding, senior members and other good gifts to you!
Introduction to reverse commissioning - VA and RVA conversion in PE 04/07
Detailed explanation of the first three passes of upload Labs
Fastcgi CGI shallow understanding
Laravel configures passport and returns token using JWT
深入理解.Net中的线程同步之构造模式(二)内核模式2.内核模式构造物Semaphone
Pytorch查看模型参数量和计算量
Alipay certificate mode payment interface
[kubernetes series] k8s set mysql8 case insensitive
org.json.JSONObject对象转json,json新增元素,根据json的key获取值。以及list对象格式字符串转jsonArray
Implementation of forwarding server using IO multiplexing
KnightCTF WEB
Four isolation levels of MySQL
Begin End use the pit encountered
ctfshow nodejs
notepad正则删除关键词所在行
Jetpack compose for perfect screen fit
Details of gets, fgetc, fgets, Getc, getchar, putc, fputc, putchar, puts, fputs functions
Introduction to the renewal of substrate source code: the pallet alliance is incorporated into the main line,
Thoughts on the security of a PHP file name regular verification