Schema:

ORGANIZATION_USAGE

SNOWPIPE_STREAMING_CLIENT_HISTORY view¶

Important

This view is only available in the organization account. For more information, see Premium views in the organization account.

This Organization Usage view can be used to query the amount of time spent loading data into Snowflake tables using Snowpipe Streaming. The view displays the amount of data loaded and timestamp of the Snowpipe Streaming client calls for your entire Snowflake organization.

Columns¶

Column Name

Data Type

Description

CLIENT_NAME

TEXT

Name of the Snowpipe Streaming ingest client.

SNOWFLAKE_PROVIDED_ID

TEXT

Internal/system-generated identifier for the Snowpipe Streaming ingest client used for the data load.

EVENT_TIMESTAMP

TIMESTAMP_LTZ

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

EVENT_TYPE

TEXT

Type of the event.

BLOB_SIZE_BYTES

NUMBER

The blob size in bytes.

ORGANIZATION_NAME

VARCHAR

Name of the organization.

ACCOUNT_LOCATOR

VARCHAR

System-defined identifier for an account.

ACCOUNT_NAME

VARCHAR

User-defined identifier for an account.

Usage notes¶

  • Latency for the view may be up to 24 hours.

Examples¶

Query the amount of time spent loading data into Snowflake tables using Snowpipe Streaming.

SELECT * FROM SNOWFLAKE.ORGANIZATION_USAGE.SNOWPIPE_STREAMING_CLIENT_HISTORY;
Copy

The query returns the following results.

+----------------+----------------------------+------------------------------+--------------+----------------+
|    CLIENT_NAME |    SNOWFLAKE_PROVIDED_ID   |              EVENT_TIMESTAMP |   EVENT_TYPE | BLOB_SIZE_BYTES|
|----------------+--------------------------- +------------------------------+--------------|----------------|
|      MY_CLIENT |FE0B1xJrBAAL3bAAUz1M9876nMCd| 2023-02-04 02:07:34.000 +0000| BLOB_PERSIST |           1,648|
|      MY_CLIENT |D1CIBBPGGFyprBanMvAA1234V3ss| 2023-02-04 02:15:54.000 +0000| BLOB_PERSIST |           3,120|
+----------------+----------------------------+------------------------------+--------------+----------------+
Copy

Query the hourly credits consumed by each client loading data into Snowflake tables using Snowpipe Streaming.

SELECT account_name, COUNT(DISTINCT event_timestamp) AS client_seconds, date_trunc('hour',event_timestamp) AS event_hour, client_seconds*0.000002777777778 as credits, client_name, snowflake_provided_id
FROM SNOWFLAKE.ORGANIZATION_USAGE.SNOWPIPE_STREAMING_CLIENT_HISTORY
GROUP BY event_hour, client_name, snowflake_provided_id;
Copy

Note that there can be multiple events per second. The credits are consumed only by the actual time spent, and not by the number of events.