Study FAQ
How do I rerun a Snowflake export without mixing or overwriting deliveries?
Also asked as 2
- How can I retry a Snowflake unload safely after a partial or failed attempt?
- What makes a staged Snowflake export repeatable and safe to clean up?
Answer
Give each Snowflake unload attempt its own stage prefix and tie it to a stable source snapshot or cutoff. Record the exact published file set in a delivery manifest. On retry, use a fresh attempt path and publish its manifest only after validating the output. That lets consumers distinguish the accepted run from partial or superseded files.
OVERWRITE = FALSE does not make a repeat execution idempotent. Parallel COPY statements can generate different names and leave earlier files in place. INCLUDE_QUERY_ID = TRUE adds the COPY query ID to output names and helps Snowflake handle partial files on internal retries. It is incompatible with SINGLE = TRUE and OVERWRITE = TRUE. Explicit reruns still need an attempt path or manifest to prevent duplicate consumption.
Capture the query ID, relative filenames, sizes, timestamps, counts or business totals, and checksums when the storage and delivery contract provide them. Wait for downstream acceptance and fulfillment of retention requirements. If cleanup is authorized, list the exact path or pattern and confirm the intended files before issuing REMOVE. Check the remaining inventory after cleanup.
Full explanation
Unloading Data and Building Reliable Export Workflows
Study guide · COF-C03
Read the full explanation