Polyglot SQL API Documentation - v0.2.0
    Preparing search index...

    Function lineage

    • Trace the lineage of a column through a SQL query.

      Parameters

      • column: string

        Column name to trace (e.g. "id", "users.name")

      • sql: string

        SQL string to analyze

      • dialect: string = 'generic'

        Dialect for parsing (default: 'generic')

      • trimSelects: boolean = false

        Trim SELECT to only target column (default: false)

      Returns LineageResult

      const result = lineage("a", "SELECT a FROM t");
      // result.lineage.name === "a"
      // result.lineage.downstream[0].name === "t.a"