prorm API Reference
    Preparing search index...

    Class DataLineage

    Index
    • Apply hooks to a model for automatic lineage tracking. Called automatically by enable() when autoTrack is true.

      Parameters

      • model: any

        The model class

      • Optionalconfig: LineageConfig

        The lineage configuration

      Returns void

    • Track a data source for a record. Call this when data is imported or computed.

      Parameters

      • model: any

        The model class

      • source: DataSource

        The data source type

      • Optionaldetails: {
            sourceDetails?: string;
            metadata?: Record<string, any>;
            parentRecordId?: string | number;
            parentTableName?: string;
        }

        Additional details about the source

      Returns Promise<void>

    • Track a transformation for a record.

      Parameters

      • model: any

        The model class

      • recordId: string | number

        The record ID

      • operation: string

        The transformation operation

      • Optionaldetails: {
            description?: string;
            performedBy?: string | number;
            inputValues?: Record<string, any>;
            outputValues?: Record<string, any>;
            metadata?: Record<string, any>;
        }

        Additional transformation details

      Returns Promise<void>

    • Get the full lineage chain for a record. Includes provenance and all transformations.

      Parameters

      • recordId: string | number

        The record ID

      • tableName: string

        The table name

      Returns Promise<LineageChain | null>

    • Get just the provenance/origin for a record.

      Parameters

      • recordId: string | number

        The record ID

      • tableName: string

        The table name

      Returns Promise<LineageRecord | null>

    • Disable lineage tracking for a model.

      Parameters

      • model: any

        The model class

      Returns void

    • Check if a model has lineage tracking enabled.

      Parameters

      • model: any

        The model class

      Returns boolean