Schema:

DATA_SHARING_USAGE

LISTING_AUTO_FULFILLMENT_DATABASE_STORAGE_DAILY 视图

DATA_SHARING_USAGE 架构中的此视图可用于确定 Cross-Cloud Auto-Fulfillment 使用的数据存储。在另一个区域完成列表时,数据产品将存储在该区域中。此视图包含有关特定区域中存储了多少数据,以及数据存储与哪些列表和数据库关联的详细信息。

You can use this view to help manage the costs associated with Cross-Cloud Auto-Fulfillment. See Auto-fulfillment costs.

Column NameData TypeDescription
REGION_GROUPVARCHARRegion group where the storage usage occurred.
SNOWFLAKE_REGIONVARCHARSnowflake region where the storage usage occurred.
USAGE_DATEDATEDate in UTC when the storage usage was recorded.
DATABASE_NAMEVARCHARName of the database.
SOURCE_DATABASE_IDNUMBERInternal ID of the source database that contains the data product shared by the provider.
DELETEDTIMESTAMPTime when the database was dropped. NULL for active databases.
AVERAGE_DATABASE_BYTESFLOATNumber of bytes of database storage used, including data in Time Travel.
AVERAGE_FAILSAFE_BYTESFLOATNumber of bytes of Fail-safe storage used.
LISTINGSARRAYList of listings that reference the database in this specific region. Returns an empty array until a listing is successfully fulfilled to a region.

使用说明

  • 视图的延迟时间最长可达 2 天。
  • 数据会保留 365 天(1 年)。
  • 此视图中不包括暂存区存储。
  • 该视图仅包含 2023 年 4 月 16 日以后的数据。
  • 在自动履行不完整的情况下,为 LISTINGS 列返回的数组可能为空。
  • The view contains data for all data products, whether your data product is a Snowflake Native App or a share.

Important

This view is intended to help you understand the resources used by Cross-Cloud Auto-Fulfillment. It is not intended to be used for billing reconciliation. Instead, refer to the views in the ORGANIZATION_USAGE schema. See View actual costs for more details.

示例

Shows the average storage used in each Snowflake region over a specific time period, grouped by region and database:

SELECT
   snowflake_region,
   database_name,
   listings,
   AVG(average_database_bytes) AS AVG_storage
FROM snowflake.data_sharing_usage.listing_auto_fulfillment_database_storage_daily
WHERE 1=1
   AND usage_date BETWEEN '2023-04-17' AND '2023-04-30'
GROUP BY 1,2,3
ORDER BY 4 DESC;