| sql_lineage | R Documentation |
Traces each output column of a query back to the tables and expressions it is derived from, following CTEs, subqueries and set operations.
sql_lineage(sql, dialect = "generic", schema = NULL, column = NULL)
sql |
A single character string with one or more SQL statements
(separated by |
dialect |
Dialect used for parsing. |
schema |
Optional schema specification (see |
column |
Optional single column name. By default, lineage is computed for every output column of the query. |
A polyglot_lineage object: a list with one entry per column, each
containing
column — the output column name;
sources — character vector of source tables feeding this column;
tree — the lineage graph as nested lists with fields name,
source_name, source_kind ("Table", "Cte", "DerivedTable",
...), expression (the SQL of the node's expression) and downstream.
sql_lineage("SELECT a + b AS total FROM t")
sql_lineage(
"WITH base AS (SELECT id, amount FROM payments)
SELECT id, amount * 2 AS doubled FROM base"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.