Skip to content
Select a language
Ink illustration of a snowflake-shaped crystal linked by data streams to a secure vault
Business Continuity

How to Connect Snowflake to Astran for Business Continuity (in Two SQL Commands)

Ludovic Portpin
Ludovic Portpin

When SAP or your ERP goes down, the Snowflake copy of your business data is not enough. Two SQL commands keep it usable in Astran so critical processes keep running.

Key takeaways

  • Snowflake often holds a copy of your critical business data, but when SAP or the ERP goes down, the processes that use that data stop.
  • Astran keeps those processes executable from a secured, independently available copy of the data.
  • The integration takes two standard Snowflake SQL commands: create an external stage, then export with COPY INTO.
  • A scheduled Snowflake Task keeps the data in Astran at most 24 hours old.

How can Snowflake data support business continuity? Snowflake is often where the business truth lives, fed by SAP, the ERP or other operational systems. When one of those upstream systems is down, the data is still in Snowflake, but the processes that normally run on it are frozen. By exporting that data to Astran, teams can keep executing their critical operations while the primary systems recover. This guide shows how to connect Snowflake and Astran in two SQL commands.

Why is Snowflake a single point of truth, and a resilience question?

Snowflake has become the backbone of many companies' data strategy. Finance teams run their closing from it, supply chain teams build their dashboards on it, HR and procurement consolidate everything there. It often aggregates feeds from SAP, ERPs and operational databases.

That creates a specific resilience scenario. When an upstream system goes down (a ransomware attack on the SAP environment, a cloud incident, a network outage), the data is still in Snowflake, but the processes that run inside those systems stop.

This is where Astran comes in. Rather than waiting for SAP or the ERP to come back online, teams keep executing their critical operations from the data Astran has secured, independently of any primary system. Astran does not replace Snowflake or SAP: it keeps Vital Activities running while they recover.

How do you connect Snowflake to Astran?

Snowflake's external stage feature writes data exports directly to any S3-compatible storage. Astran's API speaks S3 natively, so the integration only needs standard Snowflake SQL.

Before you start: contact Snowflake support to authorise Astran's endpoint ({your_partition}.s3.astran.io) on your Snowflake instance. This is a one-time allowlisting step.

Step 1: create the external stage pointing to Astran

A Snowflake stage is a named pointer to an external storage location: a reusable destination for any later export. You create it once per schema.

CREATE OR REPLACE STAGE MY_DB.MY_SCHEMA.MY_S3_STAGE
  URL = 's3compat://snowflake/exports/'
  ENDPOINT = '{partition}.s3.astran.io'
  CREDENTIALS = ( AWS_KEY_ID = 'YOUR_KEY_ID' AWS_SECRET_KEY = 'YOUR_KEY_SECRET' )
  FILE_FORMAT = ( TYPE = CSV FIELD_OPTIONALLY_ENCLOSED_BY = '"' );
Parameter What to put here Notes
MY_DB Your Snowflake database name e.g. FINANCE_DB, OPS_DB: the database where the stage object lives
MY_SCHEMA Your Snowflake schema name e.g. PUBLIC, EXPORTS, RESILIENCE
MY_S3_STAGE A name for this stage e.g. ASTRAN_RESILIENCE_STAGE
YOUR_KEY_ID Astran API key ID Created by your Astran administrator
YOUR_KEY_SECRET Astran API secret key Treat it like a password; store it in Snowflake Secrets Manager in production

Step 2: export your data into the stage

Once the stage exists, a single COPY INTO command pushes any table or query result into Astran's storage. The example below uses Snowflake Sample Data, available on every Snowflake account, so you can test the full flow without touching your own data.

COPY INTO @MY_DB.MY_SCHEMA.MY_S3_STAGE/nation_export/
  FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.NATION
  FILE_FORMAT = ( TYPE = CSV FIELD_OPTIONALLY_ENCLOSED_BY = '"' COMPRESSION = NONE )
  HEADER = TRUE
  OVERWRITE = TRUE;
Parameter What it does Notes
@MY_DB.MY_SCHEMA.MY_S3_STAGE Target stage (created in step 1) Must match the stage name exactly, prefixed with @
/nation_export/ Subfolder path within the stage Replace with your own path, e.g. /finance/closing/2024-Q4/
SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.NATION Source table (sample data here) Replace with your table or a full SELECT query
COMPRESSION = NONE No compression GZIP compression is not supported by Astran
HEADER = TRUE Writes column names in row 1 Recommended: files become self-describing

Why sample data? SNOWFLAKE_SAMPLE_DATA is a shared database available on all Snowflake accounts. TPCH_SF1.NATION is a small, clean table (25 rows), ideal to validate the pipeline before connecting your own datasets.

How do you keep the data fresh automatically?

For ongoing resilience, exports should run on a schedule, so Astran always holds a fresh copy of your data rather than a one-time snapshot. Snowflake's native Tasks feature handles this:

-- Run every night at 2am UTC
CREATE OR REPLACE TASK MY_DB.MY_SCHEMA.NIGHTLY_EXPORT
  SCHEDULE = 'USING CRON 0 2 * * * UTC'
AS
  COPY INTO @MY_DB.MY_SCHEMA.MY_S3_STAGE/my_table/
  FROM MY_DB.MY_SCHEMA.MY_TABLE
  FILE_FORMAT = (TYPE = CSV FIELD_OPTIONALLY_ENCLOSED_BY = '"' COMPRESSION = NONE)
  HEADER = TRUE
  OVERWRITE = TRUE;

ALTER TASK MY_DB.MY_SCHEMA.NIGHTLY_EXPORT RESUME;

Astran is then fed fresh data every day. If a crisis hits, your teams work from data that is at most 24 hours old.

Security reminder: do not hardcode credentials in task definitions. Use Snowflake's Secrets Manager or environment-level secret storage to handle key rotation without touching your SQL.

When SAP is down, do your operations have to stop?

No. The real risk is not losing Snowflake: it is losing the ability to act on the data it holds. With Astran connected to Snowflake through a scheduled S3 export, teams keep executing their critical processes from a secured, independently available copy, without waiting for any primary system to come back. Two SQL commands to set up, continuous resilience as the result.

Frequently asked questions

Does Astran replace Snowflake or SAP?

No. Astran keeps critical processes executable while upstream systems recover. Snowflake and SAP remain your systems of record.

Which file formats and compression does the integration support?

The examples use CSV with headers and no compression. GZIP compression is not supported by Astran.

How fresh is the data available during a crisis?

With a nightly Snowflake Task, the data in Astran is at most 24 hours old. You can schedule exports more often if your processes require it.

The full documentation is available at docs.astran.ai, and our team can run a Pilot with you in as little as two weeks.

Related reading

Share this post