Module 16 · Lesson 6 of 10Detailed study · about 18 min

Track serverless, Snowpipe and ingestion costs

Choose the right cost meter for warehouse COPY INTO, Snowpipe, Snowpipe Streaming and serverless tasks. Compare billed bytes, credits, retries and delivery freshness.

Find the meter behind each ingestion path

A partner sends a new orders feed. Batch COPY INTO runs on the warehouse you select, so its compute is on that warehouse’s meter. Snowpipe and Snowpipe Streaming use Snowflake-managed compute and have feature-specific billing. Start by finding the path the feed actually uses.

File-based Snowpipe uses a fixed number of credits per GB loaded at the documented rate. CSV, JSON and other text formats use uncompressed bytes. Binary formats such as Parquet use observed file size. A compressed CSV that occupies 1 GB on a stage but expands to 5 GB is billed on 5 GB for ingestion. File count and file size still affect freshness and throughput.

Snowpipe Streaming high-performance architecture charges for the uncompressed data values ingested, measured at the service input. It has a different meter from file-based Snowpipe. The classic architecture primarily meters serverless compute and active client connections. Identify the architecture before comparing byte volumes or credit rates.

Compare fresh data delivered with what was billed

Suppose file-based ingestion rises from 5 to 10 billed GB while the rate and service stay the same. Expect about twice the volume-based ingestion charge. If rows delivered stay flat, check whether a source sent larger records or replayed data. Inspect load history and failure details before blaming retries or assuming every attempt loaded a second copy.

A serverless task consumes Snowflake-managed compute when it runs. Use SERVERLESS_TASK_HISTORY for credits and task execution history for run counts, errors and durations. A task using a warehouse appears in warehouse metering. Compare credits per successful, on-time run and check the downstream freshness before reducing run frequency.

Treat stage storage and eligible cross-region transfer as separate charges. Compare alternatives at the same required freshness and reliability. A nightly batch and a minute-by-minute feed solve different business problems.

Match the usage source to the ingestion mechanism
MechanismInspect firstUseful operating measure
Warehouse COPY INTOWarehouse metering and load historyCompute per successful batch
File-based SnowpipePIPE_USAGE_HISTORYBilled bytes and credits per pipe
Snowpipe StreamingArchitecture-specific billing guide and meterInput volume or client activity, plus latency
Serverless taskSERVERLESS_TASK_HISTORY and task execution historyCredits per successful on-time run

Explain the difference between billed bytes and useful delivery

A file-based pipe and a streaming app may both land orders. For files, use billed volume and a separate load record. For streaming, check the architecture first. A rate R credits per billed GB yields 5 × R when a 1 GB gzip CSV expands to 5 billed GB. For high-performance streaming receiving 1 MB of uncompressed values each second, one continuous hour meters about 3.6 GB at that feature’s applicable rate. Avoid using the file-pipe rate for streaming.

Maple Market sees the file-pipe sample rise from 5 to 10 billed GB with 50,000 successful rows each day. That is twice the bytes per delivered row at the same rate. Compare filenames, source fields and load statuses. Verify whether larger payloads, overlapping paths or intentional replays explain the growth. A retry log alone cannot prove duplicate data or duplicate charges.

Representative investigation output, same number of delivered rows
UTC dayBilled pipe GBLoaded rowsBytes per loaded rowDelivery target
A550,000100,000Met
B1050,000200,000Met

Compare billed input with actual load records

Run with approved usage access and substitute the fully qualified pipe name and closed period. The existing PIPE_USAGE_HISTORY query provides billed bytes. The load record below counts files and rows by status. Compare the same UTC window, target and pipe. Keep the two histories separate because metering intervals do not correspond one-to-one to files.

SQL · configuration template
ALTER SESSION SET TIMEZONE = 'UTC';
SELECT TO_DATE(last_load_time) AS utc_day, status, COUNT(*) AS files,
       SUM(row_count) AS loaded_rows, SUM(error_count) AS errors
FROM SNOWFLAKE.ACCOUNT_USAGE.COPY_HISTORY
WHERE pipe_catalog_name = '<DB>' AND pipe_schema_name = '<SCHEMA>' AND pipe_name = '<PIPE>'
  AND last_load_time >= '2026-10-05'::DATE AND last_load_time < '2026-10-07'::DATE
GROUP BY utc_day, status ORDER BY utc_day, status;

Inspect the high-performance streaming meter without adding it twice

Use a configured high-performance pipe with an approved history role. Match the pipe ID and name to metering records. This is a resource drill-down, not a reconciliation of every streaming charge. A blank period can reflect lag, an unmatched pipe, architecture, or filters. Classic uses other history, including client activity and migration history. Wait for streaming metering to arrive before making a daily decision.

SQL · configuration template
ALTER SESSION SET TIMEZONE = 'UTC';
SELECT p.pipe_id, p.pipe_name, SUM(m.bytes) AS metered_bytes,
       SUM(m.credits_used) AS credits
FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY m
JOIN SNOWFLAKE.ACCOUNT_USAGE.PIPES p
  ON m.entity_id = p.pipe_id AND m.name = p.pipe_name
WHERE m.service_type = 'SNOWPIPE_STREAMING'
  AND m.start_time >= '2026-10-05'::DATE AND m.start_time < '2026-10-07'::DATE
  AND p.pipe_id = <approved_pipe_id>
GROUP BY p.pipe_id, p.pipe_name;

Pick an ingestion change by freshness and retry behavior

Batch COPY is a good candidate when a bounded delivery window can wait and you can group compute. File-based Snowpipe fits arriving files with a tighter delivery goal. Streaming fits application events when waiting to create a file hurts the business. For a conversion, run a sandbox target, compare distinct event IDs and errors, then measure billed work and delivery delay. Prevent the two production loaders from writing the same prefix or event set.

If serverless tasks grew instead, inspect runs, actual data change, and failures against SERVERLESS_TASK_HISTORY. Change a cadence only after measuring downstream freshness and choosing a rollback. A cheaper but stale pipeline does not meet the same goal.

Explain the decision in an interview

Start with the rule, then say what you would check in a real account.

How would you explain a Snowpipe bill that doubled with stable row count?

I compare billed bytes and successful loads by pipe. Text input is billed on uncompressed volume, so the source may send larger payloads or somebody may have loaded the same data through multiple paths.

What do you measure before moving batch COPY to streaming?

I would compare the same events and required freshness, check duplicates and errors, and use the meter for each architecture.

Words used in this lesson
Serverless compute
Compute resources sized and operated by Snowflake for a feature.
Billed bytes
Input volume counted for a feature’s billing rules.
Freshness
How current the available data must be for its users.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 2

Track serverless, Snowpipe and ingestion costs

Warehouse COPY
Snowpipe or Streaming
Serverless task

Identify the path

The warehouse meter covers manual batch COPY. A pipe or serverless task has its own meter.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Identify the path

    The warehouse meter covers manual batch COPY. A pipe or serverless task has its own meter.

    Warehouse COPY → Snowpipe or Streaming → Serverless task

  2. Explain the change

    Compare billed units with successful delivery and latency over equal time windows.

    Billed usage → Rows delivered → Freshness

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Read Snowpipe billed volume and credits together

SQL · runnable example
ALTER SESSION SET TIMEZONE = 'UTC';

SELECT pipe_id,
       MAX(pipe_name) AS pipe_name,
       SUM(bytes_billed) AS billed_bytes,
       SUM(credits_used) AS credits_used
FROM snowflake.account_usage.pipe_usage_history
WHERE start_time >= DATEADD(day, -8, CURRENT_DATE())
  AND start_time < DATEADD(day, -1, CURRENT_DATE())
  AND pipe_name IS NOT NULL
GROUP BY pipe_id
ORDER BY credits_used DESC;

What to expect and why

An authorized usage role can sum a complete window by pipe ID. The named-pipe filter leaves out unnamed entries such as some auto-refresh records, so the result is a drill-down. For a pipe loading 5 billion billed bytes in one closed window and 10 billion in another, compare credits and rows delivered over equal windows.

Find the serverless tasks consuming credits

SQL · runnable example
ALTER SESSION SET TIMEZONE = 'UTC';

SELECT database_name,
       schema_name,
       task_name,
       SUM(TO_DOUBLE(credits_used)) AS credits_used
FROM snowflake.account_usage.serverless_task_history
WHERE start_time >= DATEADD(day, -8, CURRENT_DATE())
  AND start_time < DATEADD(day, -1, CURRENT_DATE())
GROUP BY database_name, schema_name, task_name
ORDER BY credits_used DESC;

What to expect and why

The result is one credit total per qualified task name for the chosen week. Look up the highest task in execution history to see whether it ran more often, took longer or failed repeatedly. Confirm that the downstream tables met freshness targets.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

A gzip CSV expands from 1 GB to 5 GB. Which size does file-based Snowpipe use for this text file?

Try it yourself

Serverless task credits double while the schedule and delivery target stay the same. Which two kinds of history should you compare?

Compare your reasoning

Compare task credit usage with task run history. Look for a changed input size, more executions or re-executions, longer runs and failures before proposing a schedule change.

Connect this lesson to the learning path

Official sources and curriculum

Module 16 · See module scope

By Rohit Ray · Independent educational lesson · Explore this visual lab