Docs/Connections

Snowflake target

DBConvert Streams is adding Snowflake as a future target for Load workflows. The planned flow stages Parquet files before loading them into Snowflake.

Prerequisites

  • Network reachability to your Snowflake endpoint
  • Valid credentials with database/schema access
  • A Snowflake user stage (@~) is used by default for file uploads

Connection settings

FieldRequiredDescription
accountYesSnowflake account identifier (e.g., xy12345.us-east-1)
usernameYesSnowflake username
passwordYesSnowflake password
databaseNoDefault database
schemaNoDefault schema
warehouseNoDefault warehouse
roleNoDefault role

Stream configuration

The Snowflake target uses spec.snowflake with a required staging block that controls how intermediate Parquet files are generated and uploaded.

{
  "name": "MySQL to Snowflake",
  "mode": "load",
  "source": {
    "id": "conn_mysql",
    "spec": {
      "db": {
        "database": "commerce"
      }
    }
  },
  "target": {
    "id": "conn_snowflake",
    "spec": {
      "snowflake": {
        "database": "ANALYTICS",
        "schema": "PUBLIC",
        "staging": {
          "fileFormat": "parquet",
          "outputDirectory": "/tmp/snowflake-staging",
          "format": {
            "compression": "zstd"
          }
        }
      }
    }
  }
}

Target fields

FieldRequiredDefaultDescription
databaseYesTarget Snowflake database
schemaNoPUBLICTarget schema
schemaPolicyNofail_if_existsHow to handle existing tables
writeModeNofail_if_not_emptyHow to handle existing rows

Staging fields

FieldRequiredDefaultDescription
staging.fileFormatNoparquetIntermediate file format: parquet, csv, jsonl
staging.outputDirectoryNoSystem temp dirLocal directory for intermediate files before upload
staging.format.compressionNozstdCompression for intermediate files

How loading works

  1. Source data is converted to Parquet format
  2. Parquet files are organized per table with Hive-style partitioning
  3. Files are uploaded to a Snowflake stage
  4. COPY INTO loads the data with USE_LOGICAL_TYPE = TRUE for correct type handling

Multiple Parquet chunk files per table are consolidated into the target table automatically.

Why Parquet

Parquet is the default and recommended format for Snowflake targets.

AspectParquetCSV.gz
Loading methodVectorizedLine-by-line parsing
SchemaSelf-describingRequires manual mapping
Type safetyValidated at write timeRuntime errors
Analytical queriesColumn pruningFull scan required

No additional configuration is needed — the stream generates Parquet files with zstd compression by default.

Type handling

Timestamps

Snowflake's COPY INTO command runs with USE_LOGICAL_TYPE = TRUE, which ensures Parquet logical types are interpreted correctly. Supported types: DATE, TIME, DATETIME, TIMESTAMP, and TIMESTAMP WITH TIME ZONE.

Binary data (BLOBs)

MySQL BLOB and binary columns are automatically base64-encoded and mapped to VARCHAR in Snowflake. This avoids UTF-8 validation errors during Parquet loading. The conversion is transparent — no manual configuration needed.

Verification

After a stream completes, verify the data in Snowflake:

-- Check row counts
SELECT COUNT(*) FROM my_table;

-- Verify timestamp values
SELECT created_at FROM my_table LIMIT 5;

-- Check binary data (stored as base64)
SELECT LENGTH(picture_column) FROM my_table WHERE picture_column IS NOT NULL;

Limitations

  • Target only — Snowflake is not supported as a source
  • Load mode only — CDC is not supported for Snowflake targets
  • Binary size — base64 encoding adds ~33% size overhead for BLOB columns