Skip to contents

Records the source(s) of a table for data lineage tracking. Lineage is stored in the table's comment as JSON metadata.

Usage

db_lineage(schema = "main", table, sources, transformation = NULL)

Arguments

schema

Schema name (default "main")

table

Table name

sources

Character vector of source table names or descriptions

transformation

Description of how data was transformed

Value

Invisibly returns TRUE

See also

db_get_lineage() to retrieve lineage

Examples

if (FALSE) { # \dontrun{
db_connect()

db_lineage(
  table = "monthly_summary",
  sources = c("raw.transactions", "raw.products"),
  transformation = "Aggregated by month and product category"
)
} # }