Snowpipe 成本

借助 Snowpipe 的无服务器计算模型,用户可以启动任何大小的负载,而无需管理虚拟仓库。相反,Snowflake 提供并管理计算资源,根据当前的 Snowpipe 负载自动增加或缩小容量。

Important

Snowpipe 数据引入按每 GB 固定积分数量计费。这种简化的模型为您提供了更加可预测的数据加载费用,并简化了成本估算。之前的计费模型包含两个部分:用于加载数据的实际计算资源(按每秒/每核心计费),以及每 1,000 个文件收取的费用。

这种按每 GB Credit 计费的模型适用于所有 Snowflake 版本:Standard、Enterprise、Business Critical 和 Virtual Private Snowflake (VPS)。

For text files — such as CSV, JSON, XML — you are charged based on their uncompressed size. For binary files — such as Parquet, Avro, ORC — you are charged based on their observed size regardless of compression.

For more information, see Snowflake Service Consumption Table.

资源使用和管理开销

在按每 GB Credit 的定价模型下,Snowpipe 的计费基于您加载的每 GB 数据所对应的固定积分数量。这种简化的方式意味着您无需再跟踪或管理计算资源的使用情况,而此前该使用情况是以每秒/每核心的粒度进行计量的。

File sizes and staging frequency might impact the performance of Snowpipe. For recommended best practices, see Continuous data loads — that is, Snowpipe — and file sizing.

Estimation of Snowpipe charges

Estimating Snowpipe charges is straightforward. You can calculate your expected costs by using your anticipated data volume and the fixed credit amount per GB. Because text files — such as CSV, JSON, XML — are charged based on their uncompressed size, you must know the compression ratio of your text files.

You can verify these calculations against your actual usage by examining the BILLED_BYTES column in the relevant Account Usage views. The BILLED_BYTES column was introduced in the 2025_05 BCR bundle.

要了解特定工作负载的实际 Credit 使用量,建议通过执行一组典型的负载来进行实验。

View data-load history and cost

Account administrators (users with the ACCOUNTADMIN role) or users with a role granted the MONITOR USAGE global privilege can use Snowsight or SQL to view the credits billed to your Snowflake account within a specified date range.

Occasionally, the data compaction and maintenance process can consume Snowflake credits. For example, the returned results might show that you consumed credits with 0 BYTES_INSERTED and 0 FILES_INSERTED. This means that your data is not being loaded, but the data compaction and maintenance process has consumed some credits.

要查看您账户中 Snowpipe 数据加载的 Credit 账单,请执行以下操作:

Snowsight:

In the navigation menu, select Admin » Cost management.

SQL:

查询以下任一内容:

查询:Snowpipe 成本历史记录(按天、按对象)

以下查询提供管道的完整列表,以及过去 30 天通过服务使用的 Credit 量(按天细分)。

SELECT TO_DATE(start_time) AS date,
  pipe_name,
  SUM(credits_used) AS credits_used,
  SUM(bytes_billed) AS bytes_billed_total
FROM snowflake.account_usage.pipe_usage_history
WHERE start_time >= DATEADD(month,-1,CURRENT_TIMESTAMP())
GROUP BY 1,2
ORDER BY bytes_billed_total DESC;

查询:Snowpipe 历史记录和 m 天平均值

以下查询显示了去年按周分组的 Snowpipe 平均每日使用的 Credit。此查询可以帮助您识别一年中每日平均使用量的异常情况,以便您可以调查使用量的突然增长或意外变化。

WITH credits_by_day AS (
  SELECT TO_DATE(start_time) AS date,
 SUM(credits_used) AS credits_used,
 SUM(bytes_billed) AS bytes_billed_total
  FROM snowflake.account_usage.pipe_usage_history
  WHERE start_time >= DATEADD(year,-1,CURRENT_TIMESTAMP())
  GROUP BY 1
)
SELECT DATE_TRUNC('week',date),
  AVG(credits_used) AS avg_daily_credits,
  AVG(bytes_billed_total) AS avg_daily_bytes_billed
FROM credits_by_day
GROUP BY 1
ORDER BY 1;

Note

Resource monitors provide control over virtual warehouse credit usage; however, you cannot use them to control credit usage for the Snowflake-provided warehouses, including the Snowflake logo in blue (no text) SNOWPIPE warehouse.