{"id":1974,"date":"2022-05-21T09:35:52","date_gmt":"2022-05-21T14:35:52","guid":{"rendered":"https:\/\/www.dpriver.com\/blog\/?p=1974"},"modified":"2022-05-21T09:37:53","modified_gmt":"2022-05-21T14:37:53","slug":"introduction-to-gudu-sqlflow-indirect-data-flow-pseudo-columns","status":"publish","type":"post","link":"https:\/\/www.dpriver.com\/blog\/2022\/05\/introduction-to-gudu-sqlflow-indirect-data-flow-pseudo-columns\/","title":{"rendered":"Introduction to Gudu SQLFlow Indirect Data Flow and Pseudo Columns"},"content":{"rendered":"

## Gudu SQLFlow<\/a> Indirect Data Flow & Pseudo Columns\u00a0Introduction<\/h2>\n

This article describes some of the SQL elements that generate indirect data flow. Indirect data flow is typically generated by columns used in where clauses, group by clauses, aggregate functions, etc.<\/p>\n

To create indirect data flow between columns, we introduce a pseudocolumn: RelationRows.\u00a0<\/span><\/p>\n

RelationRows is a pseudocolumn of the relation, used to represent the number of rows in the relation. As the name suggests, RelationRows are not true columns in a relation (table\/result set etc).\u00a0<\/span><\/p>\n

Typically, it is used to represent the flow of data between columns and relationships.\u00a0The RelationRows pseudo-column can be used in both source and target relationships.\u00a0<\/span><\/p>\n

### 1. RelationsRows in the target relationship<\/h3>\n

Take the following SQL as an example:<\/p>\n

<\/p>\n

The total number of rows in the select list is affected by the value of the sal column in the where clause. Therefore, the indirect data flow is created like this:<\/p>\n

<\/p>\n

Data flow diagram:<\/p>\n

<\/p>\n

### 2. RelationsRows in the source relation<\/h3>\n

Here is another example SQL:<\/p>\n

<\/p>\n

The value of the count() function and sum(sal) function is affected by the number of rows in the scott.emp source table.<\/p>\n

<\/p>\n

Data flow diagram:<\/p>\n

<\/p>\n

### 3. RelationshipsRows in table-level data flow relationships<\/h3>\n

RelationRows are also used to represent table-level data flows.\u00a0<\/span><\/p>\n

<\/p>\n

Table-level data flow is not built on the table, but on the pseudo column RelationRows, like this: t2.RelationRows -> direct -> t3.RelationRows<\/p>\n

<\/p>\n

There are two reasons to use the RelationRows pseudo-column to build a table-to-table data flow:<\/p>\n

\n
1. This pseudo-column used to represent the table-to-column data flow will later be used to generate the table-to-table data flow if the user needs a table-level provenance model.<\/li>\n
2. If other columns from the same table are used in a column-to-column data flow that is itself in a table-to-table data flow, then this pseudo-column will enable a single table to contain both column-to-column data flow and table-to-table data flow.<\/li>\n<\/ol>\n

   Take this SQL as an example:<\/p>\n

   <\/p>\n

   The first create view statement will generate a column-level data flow between table t2 and view v1:<\/p>\n

   <\/p>\n

   And the second alter table statement will generate table-level data flow between tables t2 and t3.<\/p>\n

   <\/p>\n

   <\/p>\n

   As you can see, table t2 involves the column-to-column data flow generated by the create view statement. It also involves the table-to-table data flow generated by the alter Table statement, as shown in a table t2 in the figure above, which includes both column-to-column and table-to-table data flow.<\/p>\n

   ### Conclusion<\/h3>\n

   Thank you for reading our list and we hope it can help you to have a better understanding of the\u00a0Gudu SQLFlow indirect data flow and pseudo columns. If you want to learn more about Gudu SQLFlow, we would like to advise you to visit their official website for more information.<\/p>\n

   As one of the\u00a0best data lineage tools<\/a>\u00a0<\/strong>on the market today, Gudu SQLFlow can not only analyze SQL script files, obtain data lineage<\/a><\/strong>, and perform visual display, but also allow users to provide data lineage in CSV format and perform visual display.<\/p>\n

   <\/p>\n","protected":false},"excerpt":{"rendered":"

   Gudu SQLFlow Indirect Data Flow & Pseudo Columns\u00a0Introduction This article describes some of the SQL elements that generate indirect data flow. Indirect data flow is typically generated by columns used in where clauses, group by clauses, aggregate functions, etc. To create indirect data flow between columns, we introduce a pseudocolumn: RelationRows.\u00a0 RelationRows is a pseudocolumn of the relation, used to represent the number of rows in the relation. As the name suggests, RelationRows are not true columns in a relation (table\/result set etc).\u00a0 Typically, it is used to represent the flow of data between columns and relationships.\u00a0The RelationRows pseudo-column can\u2026<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,8],"tags":[31,26,28,27],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":5}},"yoast_head":"\nIntroduction to Gudu SQLFlow Indirect Data Flow and Pseudo Columns<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n