Getting Started
https://www.sqlflow.cn/gudu-sqlflow-introduction
Let's analyze the following SQL statements to see how to get the data dependencies between tables/views.
Tips:
You need to have basic SQL knowledge to understand this doc. No data lineage knowledge is required before you start this doc. You can simply consider data lineage as the data relationship between tables in database.
INSERT INTO deptsal
(dept_no,
dept_name,
salary)
SELECT d.deptno,
d.dname,
SUM(e.sal + Nvl(e.comm, 0)) AS sal
FROM dept d
left join (SELECT *
FROM emp
WHERE hiredate > DATE '1980-01-01') e
ON e.deptno = d.deptno
GROUP BY d.deptno,
d.dname;
Data of the table
deptsal
come from the table dept
and the table emp
. More specifically, following data lineage relationship can be deduced:deptsal.dept_no
field comes fromdept.deptno
deptsal.dept_name
field comes fromdept.name
deptsal.salary
field comes fromemp.sal
andemp.comm
Through Gudu SQLFlow, we can visualize the above data lineage as:

Last modified 5mo ago