Prompt
How do I get a dataset into Snowflake without a bunch of cleanup?
Latest observation
Oct 16, 2026
OpenAI APIWeb search: off
The easiest way to get a dataset into Snowflake with minimal cleanup is to stage it as-is, load it into a landing table, and use Snowflake’s semi-structured handling and simple transformations afterward.
Best approach
- Upload the raw file to a Snowflake stage:
- Internal stage, external stage, or Snowflake client upload.
- Load into a raw/landing table:
- Keep the original columns mostly unchanged.
- If data is messy, consider loading into a table with a few broad columns, or use a
VARIANTcolumn for JSON-like data.
- Use
COPY INTOwith tolerant file options:ON_ERROR = CONTINUEto skip bad rowsNULL_IFto handle placeholders like"",NA,NULLTRIM_SPACE = TRUEFIELD_OPTIONALLY_ENCLOSED_BY = '"'
- Clean later with SQL:
- Use
TRY_CAST,COALESCE,SPLIT_PART,REGEXP_REPLACE, etc.
- Use
Example for CSV
COPY INTO my_raw_table
FROM @my_stage/myfile.csv
FILE_FORMAT = (
TYPE = CSV
SKIP_HEADER = 1
FIELD_OPTIONALLY_ENCLOSED_BY = '"'
TRIM_SPACE = TRUE
NULL_IF = ('', 'NA', 'NULL')
)
ON_ERROR = CONTINUE;
If the dataset is semi-structured
If it’s JSON, Avro, Parquet, or XML, Snowflake handles this even better:
- Load directly into a
VARIANTcolumn - Query nested fields later
Example:
COPY INTO my_json_table
FROM @my_stage/data.json
FILE_FORMAT = (TYPE = JSON);
If you want the least cleanup possible
- Prefer Parquet over CSV if you control the source
- Use Snowpipe for automatic ingestion
- Load raw data first, transform with dbt / views / tasks later
Rule of thumb
If your goal is “get it in fast, clean it later,” then:
- raw landing table + tolerant
COPY INTO+VARIANTwhere possible is the simplest path.
If you want, I can show you the exact Snowflake setup for CSV, JSON, or Excel-derived data.