- Schema:
SNOWFLAKE_ APP_ RUNTIME_ COMPUTE_ HISTORY view¶
The SNOWFLAKE_APP_RUNTIME_COMPUTE_HISTORY view in the ACCOUNT_USAGE schema returns the hourly compute credit usage for Snowflake App Runtime in an account within the last 365 days (1 year).
Each row is one hour of usage for one compute type. Use COMPUTE_TYPE to tell the rows apart:
MANAGED COMPUTE POOL: account-level usage on the shared Snowflake-managed compute pool.COMPUTE_POOL_NAMEisSNOWFLAKE_APP_RUNTIME_COMPUTE. The application service and user columns are NULL. Per-app cost attribution isn’t available for these rows.SERVERLESS: usage attributed to one application service.APPLICATION_SERVICE_IDandAPPLICATION_SERVICE_NAMEidentify the service.COMPUTE_POOL_NAMEandUSER_IDare NULL.PREVIEW: usage attributed to the user who ran a Snowflake App Runtime preview on Workspaces.USER_IDidentifies that user.COMPUTE_POOL_NAMEand the application service columns are NULL.
Columns¶
| Column Name | Data Type | Description |
|---|---|---|
| START_TIME | TIMESTAMP_LTZ | The date and beginning of the hour (in the local time zone) in which the usage took place. |
| END_TIME | TIMESTAMP_LTZ | The date and end of the hour (in the local time zone) in which the usage took place. |
| COMPUTE_POOL_NAME | VARCHAR | Name of the Snowflake-managed compute pool. SNOWFLAKE_APP_RUNTIME_COMPUTE when COMPUTE_TYPE is MANAGED COMPUTE POOL; NULL for serverless and preview rows. |
| CREDITS_USED | NUMBER | Number of credits used for this row in the hour. |
| APPLICATION_SERVICE_ID | NUMBER | Identifier of the application service. Populated when COMPUTE_TYPE is SERVERLESS; otherwise NULL. |
| APPLICATION_SERVICE_NAME | VARCHAR | Name of the application service. Populated when COMPUTE_TYPE is SERVERLESS; otherwise NULL. |
| USER_ID | NUMBER | Identifier of the user associated with the usage. Populated when COMPUTE_TYPE is PREVIEW; otherwise NULL. |
| COMPUTE_TYPE | VARCHAR | Kind of App Runtime compute for the row: MANAGED COMPUTE POOL, SERVERLESS, or PREVIEW. |
Usage notes¶
- Latency for the view may be up to 180 minutes (3 hours).
- Managed compute pool rows are one row per account per hour. Serverless rows are one application service per hour. Preview rows are one user per hour.
- Credit usage reported here is also included in
METERING_HISTORY and
METERING_DAILY_HISTORY.
SERVICE_TYPEin those views depends onCOMPUTE_TYPE:MANAGED COMPUTE POOLis reported asSNOWFLAKE_APP_RUNTIME.SERVERLESSis reported asSNOWFLAKE_APP_RUNTIME_SERVERLESS.PREVIEWis reported asSNOWFLAKE_APP_RUNTIME_PREVIEW.
Examples¶
Return daily Snowflake App Runtime credit usage for the last 30 days:
Return daily credit usage by compute type and application service for the last 30 days: