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

JSON to Snowflake CREATE TABLE

Paste a JSON array, get a Snowflake DDL with NUMBER and TIMESTAMP_NTZ types.

Open the Schema Inferrer →

Overview

Snowflake handles JSON natively via the VARIANT type, but for high-volume analytics it's faster to land the data into a typed table. The schema inferrer reads your JSON sample and emits a Snowflake CREATE TABLE with NUMBER(p,s) for decimals, BOOLEAN for true/false, and TIMESTAMP_NTZ/TIMESTAMP_TZ chosen from the timestamp shape.

What you get

✓ INCLUDED
Snowflake types: NUMBER, FLOAT, BOOLEAN, DATE, TIMESTAMP_NTZ, TIMESTAMP_TZ, VARCHAR
✓ INCLUDED
Pair with COPY INTO ... FILE_FORMAT = (TYPE = JSON) to load directly
✓ INCLUDED
Or use as a staging table behind a VARIANT raw landing zone
✓ INCLUDED
Handles deeply-nested objects by suggesting VARIANT columns
✓ INCLUDED
Free — no Snowflake account required to generate the DDL

Type detection reference

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

Sample valueInferred type
"qty": 100NUMBER(38,0)
"price": 19.99NUMBER(10,2)
"rate": 1.234e-7FLOAT
"flag": trueBOOLEAN
"day": "2024-03-15"DATE
"ts": "2024-03-15 09:30:00"TIMESTAMP_NTZ
"ts": "2024-03-15T09:30:00+02:00"TIMESTAMP_TZ
"meta": { ... }VARIANT

Example

Input
[
  {"order_id": 1, "qty": 3, "price": 19.99, "placed_at": "2024-03-15 14:00:00"},
  {"order_id": 2, "qty": 1, "price": 99.00, "placed_at": "2024-03-15 14:05:22"}
]
Output
CREATE TABLE orders (
    order_id   NUMBER(38,0)  NOT NULL,
    qty        NUMBER(38,0)  NOT NULL,
    price      NUMBER(10,2)  NOT NULL,
    placed_at  TIMESTAMP_NTZ NOT NULL
);

Frequently asked questions

Should I land JSON as VARIANT first?
If the schema is unstable, yes — land everything in a VARIANT column, then use this generator to design the typed downstream table. If the schema is stable, generate the typed table directly.
How do I COPY INTO from a JSON file?
After creating the table, run COPY INTO orders FROM @stage/file.json FILE_FORMAT = (TYPE = JSON STRIP_OUTER_ARRAY = TRUE).
What about nested arrays?
Use FLATTEN() in your COPY INTO query, or land them as VARIANT and unnest with LATERAL FLATTEN later.

Try it now

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

Open the Schema Inferrer →

⚠ Confirm Delete