Comment on page

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 from dept.deptno
  • deptsal.dept_name field comes from dept.name
  • deptsal.salary field comes from emp.sal and emp.comm
Through Gudu SQLFlow, we can visualize the above data lineage as:

What's next?