> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kadoa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake via Snowpipe

> Load Kadoa cloud-storage exports into Snowflake with customer-managed Snowpipe

This legacy path uses Kadoa cloud-storage exports plus a Snowpipe pipeline in
your Snowflake account. Use this when you want to own the target tables, stages,
pipes, and schema evolution yourself.

For Kadoa-managed native secure sharing, see
[Snowflake Integration](/docs/integrations/snowflake).

## Setup Steps

### 1. Request Cloud Storage Delivery

Submit a request through the [Support Center](/docs/support-center) to configure
a cloud-storage connector for Snowflake ingestion.

<Note>
  Kadoa will create or configure the export bucket and provide the role ARN,
  bucket name, and path details needed for the next steps.
</Note>

### 2. Create A Storage Integration

Using the role ARN and bucket name from Kadoa, create a storage integration in
your Snowflake account:

```sql theme={null}
use role accountadmin;

create storage integration kadoa_s3_integration
  type = external_stage
  storage_provider = 's3'
  enabled = true
  storage_aws_role_arn = '<ROLE_ARN_FROM_KADOA>'
  storage_allowed_locations = ('s3://<BUCKET_NAME_FROM_KADOA>/');

grant usage on integration kadoa_s3_integration to role sysadmin;
```

Send Kadoa the generated IAM user ARN and external ID:

```sql theme={null}
desc integration kadoa_s3_integration;
```

### 3. Create A Stage

```sql theme={null}
use role sysadmin;

create or replace stage kadoa_s3_stage
  storage_integration = kadoa_s3_integration
  url = 's3://<BUCKET_NAME_FROM_KADOA>/'
  directory = (enable = true);

create or replace file format parquet_format type = 'parquet';
```

### 4. Create A Target Table

```sql theme={null}
create or replace table my_data
  using template (
    select array_agg(object_construct(*))
      within group (order by order_id)
    from table(
      infer_schema(
        location => '@kadoa_s3_stage/your-workflow-path/',
        file_format => 'parquet_format'
      )
    )
  );
```

### 5. Set Up Snowpipe

```sql theme={null}
create or replace pipe my_data_pipe
  auto_ingest = true
  as copy into my_data
  from @kadoa_s3_stage/your-workflow-path/
  file_format = (format_name = 'parquet_format')
  match_by_column_name = case_insensitive;
```

Send Kadoa the `notification_channel` value from:

```sql theme={null}
desc pipe my_data_pipe;
```

### 6. Trigger Initial Load

```sql theme={null}
alter pipe my_data_pipe refresh;
```

New Kadoa files will be loaded by your Snowpipe setup after Kadoa configures the
S3 event notification.
