Rivery Metadata
  • 22 Mar 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Rivery Metadata

  • Dark
    Light
  • PDF

Rivery Metadata

Rivery supports custom metadata that describes the data origin.
Rivery metadata currently includes:

Name Type Description Default
_rivery_last_update Datetime The time the columns was last updated or inserted (Note: At time of the insert to DB statement) Yes
_rivery_run_id String The run ID that updated the columns or inserted it Yes
_rivery_river_id String The River ID that the column originated from Yes
_rivery_river_name String The River name that the column originated from (Note: The name at the time of the run) No
_rivery_env_id String The River environment ID that the column originated from No
_rivery_env_name String The River environment name that the column originated from No
Note

Rivery Metadata cannot contain the following:
' ` " /
If the variable value contains one of those please replace it

Current supported targets:

  1. Google BigQuery
  2. Amazon Redshift
  3. Snowflake
  4. Azure Synapse
  5. Databricks SQL
  6. PostgreSQL

How to use Rivery Metadata

Every new river (to a supported metadata target) will automatically include the following metadata columns in each output table:

Note

Currently only available for predefined reports.

_rivery_last_update
_rivery_run_id
_rivery_river_id

To disable this feature, disable the toggle in the Target tab (under Additional Options).
image.png

Metadata _rivery_last_update syntax:

The following statement will be preformed for _rivery_last_update expression in each of the corresponded db:

Name Statement Type
Google Big Query CURRENT_TIMESTAMP() TIMESTAMP
Amazon Redshift GETDATE() TIMESTAMP
Snowflake current_timestamp() TIMESTAMP
Azure Synapse CURRENT_TIMESTAMP TIMESTAMP
Databricks current_timestamp() TIMESTAMP
Postgres now() TIMESTAMP

In custom expressions:

Rivery Metadata can also be used in the target mapping in custom expressions. When creating a river just go to schema tab and add any of the supported expressions, the name can be any valid name.

image.png

This will result in the following metadata in the target table:

image.png


Was this article helpful?