💙 Supporting healthcare non-profits: Metadataloop is free for 6–12 months. Contact Us to get started.
Free Online Tool

CSV to Snowflake CREATE TABLE

Paste a CSV sample, get a Snowflake-dialect DDL with NUMBER, TIMESTAMP_NTZ, and VARCHAR types.

Open the Schema Inferrer →

Overview

Snowflake doesn't enforce VARCHAR length the way Postgres or MySQL do — but defining sensible lengths still helps with COPY validation and downstream tools. MetaDataLoop emits a Snowflake CREATE TABLE with NUMBER(p,s) for decimals, BOOLEAN for true/false, TIMESTAMP_NTZ for naive timestamps, and VARCHAR(N) bucketed lengths inferred from your sample.

What you get

✓ INCLUDED
Snowflake-native types: NUMBER, FLOAT, BOOLEAN, DATE, TIMESTAMP_NTZ, TIMESTAMP_TZ, VARCHAR(N)
✓ INCLUDED
NUMBER(p,s) precision picked from observed digit counts
✓ INCLUDED
TIMESTAMP_TZ when timezone offset is present, TIMESTAMP_NTZ otherwise
✓ INCLUDED
Generates DDL that lands cleanly in any Snowflake account
✓ INCLUDED
No persisted data — sample is parsed in-session and discarded

Type detection reference

Sample values and the dialect-native type they map to.

Sample valueInferred type
100, 9999NUMBER(38,0)
12.345NUMBER(10,3)
3.14159e-5FLOAT
true, falseBOOLEAN
2024-03-15DATE
2024-03-15 09:30:00TIMESTAMP_NTZ
2024-03-15T09:30:00+05:30TIMESTAMP_TZ
"event_name"VARCHAR(128)

Example

Input
event_id,user_id,event_name,amount,occurred_at
1,42,signup,0.00,2024-03-15 09:30:00
2,42,purchase,29.99,2024-03-15 14:01:00
Output
CREATE TABLE events (
    event_id    NUMBER(38,0)   NOT NULL,
    user_id     NUMBER(38,0)   NOT NULL,
    event_name  VARCHAR(64)    NOT NULL,
    amount      NUMBER(10,2)   NOT NULL,
    occurred_at TIMESTAMP_NTZ  NOT NULL
);

Frequently asked questions

Does Snowflake care about VARCHAR(N)?
Snowflake stores all VARCHAR identically regardless of declared length, but the declaration is enforced on INSERT and respected by COPY INTO validation. Setting a sensible length catches bad data early.
Should I use NUMBER or FLOAT?
Use NUMBER for currency, IDs, and exact decimals. FLOAT is fine for scientific values where precision is approximate.
Can I load the CSV directly into the generated table?
Yes. Stage the CSV in Snowflake (PUT then COPY INTO) — the inferred lengths and types should accept your data without parse errors.

Try it now

No signup, no install — runs entirely in your browser.

Open the Schema Inferrer →

⚠ Confirm Delete