REPLICATION_USAGE_HISTORY

functionsupportedReplication, failover & backupdeprecated

docs.snowflake.com ↗

Information SchemaTable functions

This table function can be used to query the replication history for a specified database within a specified date range. The information returned by the function includes the database name, credits consumed and bytes transferred for replication. Note This function returns replication usage activity within the last 14 days. This function has been deprecated. Use DATABASE_REPLICATION_USAGE_HISTORY instead.

Syntax

supportedpartialnot supportednot scored

REPLICATION_USAGE_HISTORY(
  [ DATE_RANGE_START => <constant_expr> ]
  [ , DATE_RANGE_END => <constant_expr> ]
  [ , DATABASE_NAME => '<string>' ] )

Parameters

NameRequiredDescription
DATE_RANGE_START => constant_expr , DATE_RANGE_END => constant_exprrequiredThe date/time range to display the database replication history: If an end date is not specified, then CURRENT_DATE is used as the end of the range. If a start date is not specified, then the range starts 10 minutes prior to the start of DATE_RANGE_END (i.e. the default is to show the previous 10 minutes of history). For example, if DATE_RANGE_END is CURRENT_DATE, then the default DATE_RANGE_START is 11:50 PM on the previous day.
DATABASE_NAME => 'string'requiredDatabase name. If specified, only shows the history for the specified database. If a name is not specified, then the results include the data for each database replicated within the specified time range.

Usage notes

Output

The function returns the following elements in a JSON object: Column Name | Data Type | Description START_TIME | TIMESTAMP_LTZ | Start of the specified time range. END_TIME | TIMESTAMP_LTZ | End of the specified time range. DATABASE_NAME | TEXT | Name of the database. CREDITS_USED | TEXT | Number of credits billed for database replication during the START_TIME and END_TIME window. BYTES_TRANSFERRED | NUMBER | Number of bytes transferred for database replication during the START_TIME and END_TIME window.