Shape · Columns

Audit Stamp

Adds columns that record when the row was loaded, from which source, and in which run. Use it before writing to a warehouse so you can trace every row.

Also known as: Lineage, batch ID

How it works

Under Columns to add all four columns are ticked by default: _loaded_at, a UTC timestamp of when the node ran; _loaded_date, its date; _source, the text in _source value or, when that is blank, the name of the drone the rows came from (null if none can be found); and _batch_id, an id of the form batch-<UTC time>-<hex> minted once per execution. Every row of one execution gets the same timestamp and batch id, and a later execution mints new ones. Existing columns are never changed; a stamp column whose name the input already has is added with a _1 suffix.

Inputs and outputs

Inputs

  • data — Table

Outputs

  • data — Table

Settings

The Attributes panel of Audit Stamp, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  columns?: ("_loaded_at"|"_loaded_date"|"_source"|"_batch_id")[]
  source?: string
}

appends the selected columns to every row: _loaded_at TIMESTAMP (UTC, when the node ran), _loaded_date DATE, _source VARCHAR (blank → the upstream source name), _batch_id VARCHAR (one id per execution, same on every row)

Example

You load a daily orders file into a warehouse table and want to trace each row later. Put Audit Stamp just before the writer, set _source value to orders_daily, and each run appends rows that share one _batch_id and _loaded_at, so a bad load can be found and removed by its batch.