Schema:

ACCOUNT_USAGE

PIPE_USAGE_HISTORY view¶

This Account Usage view can be used to query the history of data loaded into Snowflake tables using Snowpipe within the last 365 days (1 year). The view displays the history of data loaded and credits billed for your entire Snowflake account.

Columns¶

Column Name

Data Type

Description

PIPE_ID

NUMBER

Internal/system-generated identifier for the pipe used for the data load. Displays NULL if no pipe name was specified in the query. Each row includes the totals for all pipes in use within the time range.

PIPE_NAME

TEXT

Name of the pipe. Displays NULL for the internal (hidden) pipe object used to refresh the metadata for an external table.

START_TIME

TIMESTAMP_LTZ

Start of the time (in the local time zone) range in which data loading took place.

END_TIME

TIMESTAMP_LTZ

End of the time (in the local time zone) range in which data loading took place.

CREDITS_USED

NUMBER

Number of credits billed for Snowpipe data loads during the START_TIME and END_TIME window.

BYTES_INSERTED

FLOAT

Number of bytes loaded during the START_TIME and END_TIME window.

FILES_INSERTED

VARIANT

Number of files loaded during the START_TIME and END_TIME window.

Usage notes¶

  • Latency for the view may be up to 180 minutes (3 hours).

  • If you want to reconcile the data in this view with a corresponding view in the ORGANIZATION USAGE schema, you must first set the timezone of the session to UTC. Before querying the Account Usage view, execute:

    ALTER SESSION SET TIMEZONE = UTC;
    
    Copy
  • Snowflake bills for auto-refresh notifications in external tables and directory tables on external stages at a rate equivalent to the Snowpipe file charge. You can estimate charges incurred by your external table and directory table auto-refresh notifications by examining this PIPE_USAGE_HISTORY view or querying the PIPE_USAGE_HISTORY function. Note that the auto-refresh pipes will be listed under a NULL pipe name. You can also view your external table auto-refresh notification history at the table-level/stage-level granularity by using the Information Schema table function AUTO_REFRESH_REGISTRATION_HISTORY.

    To avoid charges for auto-refresh notifications, perform a manual refresh for external tables and directory tables. For external tables, the ALTER EXTERNAL TABLE <name> REFRESH … statement can be used to manually synchronize your external table to external storage. For directory tables, the ALTER STAGE <name> REFRESH … statement can be used to manually synchronize the directory to external storage.