Snowflake Data Types: Complete Reference with Examples

You're loading a new feed on Friday afternoon, the pipeline runs green, and Monday's revenue total is wrong by a few cents on every row. Nothing crashed. A price landed in a FLOAT column, a timestamp lost its fractional seconds, and a text field was converted to a number with the wrong scale. That's how Snowflake data types usually cause trouble, at load time, long before anyone writes a report.

Snowflake Data Types at a Glance

Say a billing column arrives as text from one system and as a decimal from another. If you store it loosely, Snowflake will convert it for you, and that conversion can change the value. Your first job isn't picking precision or length. It's finding the right family for each column, because the family decides what operations are safe, what defaults apply, and what can go wrong without an error.

Find the Family First

Use this lookup to place each column, then go to the matching section for sizing and casting rules. Don't try to memorize every alias. You only need to know which alias maps to which core type, so a column defined as DECIMAL in a source system doesn't surprise you later.

TypeCategoryTypical useNUMBER (DECIMAL, NUMERIC, INT, BIGINT)Fixed-point numericMoney, counts and measurements needing exact decimalsFLOAT (DOUBLE, REAL)Floating-point numericScientific values where small approximation is acceptableVARCHAR (STRING, TEXT)TextNames, codes, descriptions and identifiers up to 16,777,216 charactersBOOLEANLogicalFlags such as is_activeDATEDateCalendar days without a time componentTIMETime of dayOpening hours and shift start timesTIMESTAMP_NTZDate and time, no time zoneEvents recorded in one reference zoneTIMESTAMP_LTZDate and time, session zoneValues shown in each user's local zoneTIMESTAMP_TZDate and time, stored offsetSource events that carry their own offsetBINARYBinaryRaw bytes such as hashes or encoded payloadsVARIANTSemi-structuredJSON, Avro or XML payloads with changing fieldsOBJECTSemi-structuredKey-value records with known keysARRAYSemi-structuredOrdered lists such as line items or tagsGEOGRAPHY, GEOMETRYGeospatialLocation points, routes and shapesFILEUnstructuredDocuments, images and audio stored on a stage

Why the Category Matters More Than the Name

The category sets your design path. Structured types such as NUMBER, VARCHAR and DATE fit predictable columns where every row carries the same shape, and they support fast filters, joins and aggregations. Semi-structured types fit payloads whose fields change over time, so you can land data today and decide on columns later. FILE fits content with no tabular shape at all, such as a signed contract or a call recording, where you'd store the file and extract searchable attributes separately.

A common mistake is treating these as interchangeable storage choices. They're not. A JSON payload in VARIANT can be queried by field, a PDF in FILE cannot, and a price in VARCHAR will sort and sum incorrectly until someone casts it. Start here by assigning every source column to one row of the table. Once you know the family, precision, scale and casting become small, answerable questions instead of guesswork.

Practical rule: If you can't name the family for a column in one sentence, you don't understand the source well enough to load it yet.

Numeric Types and Precision Rules

Start with the default, because it catches people out. According to Snowflake's numeric data types documentation, NUMBER defaults to NUMBER(38,0), with a maximum precision of 38 decimal digits and, unless you specify a scale, no digits after the decimal point. Precision is the total digit count, from 1 through 38, and scale is the digits to the right of the decimal point.

That arithmetic drives every sizing decision. NUMBER(38,2) allows up to 36 digits before the decimal point and 2 fractional digits. If you define a money column as plain NUMBER, you've defined a whole-number column, and cents have nowhere to go. The load may round them away instead of failing loudly.

Three Sizing Examples You Can Copy

Work from the largest legitimate value, not from today's sample data. Today's sample only shows what has happened, not what the business allows.

  • Prices: NUMBER(10,2) holds values up to 99,999,999.99, which suits most product and invoice amounts while keeping two decimal places for currency.
  • Weights: NUMBER(10,3) holds kilograms with three decimals, so a shipment weight of 1,250.375 kg keeps its gram-level detail.
  • Percentages: NUMBER(5,2) holds values up to 999.99, which covers rates above 100 percent without wasting intent on implausible ranges.

Notice what each definition communicates. A reader sees NUMBER(5,2) on a discount column and immediately knows the intended range. A reader sees NUMBER(38,0) and learns nothing except that nobody thought about it.

Precision Is a Constraint, Not a Performance Dial

Here's the part that surprises engineers coming from other engines. Reducing precision doesn't shrink storage or improve efficiency. The default maximum precision is used unless you need a narrower logical constraint. So you don't choose NUMBER(10,2) to save space. You choose it to document intent and reject out-of-range values at load time, when bad data is cheapest to fix.

The aliases follow the same logic. DECIMAL, NUMERIC, INT, INTEGER, BIGINT, SMALLINT, TINYINT and BYTEINT all map to NUMBER, although integer aliases don't allow you to specify precision and scale. If fractional digits matter, define NUMBER(p,s) explicitly instead of relying on an integer alias and hoping.

Exact Versus Approximate

NUMBER gives you exact decimal arithmetic, which is why it suits financial, billing, telemetry and operational systems. FLOAT gives you approximation, which is fine for a sensor reading or a statistical model output, and wrong for an invoice total that must reconcile to the cent. If a value will ever be summed for money, audited, or compared for equality, it belongs in NUMBER.

Choose precision and scale from the largest legitimate business value and the fractional accuracy required, then add application-level validation for stricter business rules the column alone can't express.

Dates, Times and Timestamp Precision

Three families cover calendar and clock values. DATE stores a calendar day with no time. TIME stores a time of day with no date. TIMESTAMP types store both, and the three variants differ only in how they handle time zones, which is exactly where reporting bugs hide.

TIMESTAMP_NTZ stores no zone, so it suits events already recorded in one agreed reference zone. TIMESTAMP_LTZ displays values in the session time zone, so two users in different regions see local times for the same event. TIMESTAMP_TZ keeps the offset the source supplied, so you preserve what the originating system recorded. Pick based on who reads the data, not on which variant your last project used.

Fractional Seconds From 0 to 9

According to Snowflake's date and time data types documentation, fractional-seconds precision ranges from 0 digits, representing seconds, to 9 digits, representing nanoseconds, and the default precision is 9. Every timestamp variant, plus the TIMESTAMP alias, accepts an optional precision such as TIMESTAMP(3).

PrecisionSmallest unitTypical useTIMESTAMP(0)SecondsBatch job start and end timesTIMESTAMP(3)MillisecondsApplication and web server logsTIMESTAMP(6)MicrosecondsDatabase transaction timestampsTIMESTAMP(9)Nanoseconds (default)High-frequency telemetry and industrial monitoring

Millisecond precision is usually enough for ordinary application logs. High-frequency telemetry, industrial monitoring and transaction sequencing may need finer precision, because events can share the same millisecond and still have a real order. Teams building time-series workloads on Snowflake run into this quickly when sensor readings arrive faster than a second-level column can separate them.

Match the Column to the Source Clock

The rule is simple. Pick the smallest precision the source provides. A nanosecond column loaded from millisecond logs doesn't add accuracy, it implies accuracy that doesn't exist, and downstream users will trust digits that are really padding. Selecting the smallest precision that satisfies the use case makes schemas clearer and stops that false confidence.

Contrast this with text, where sizing works differently. VARCHAR takes a length in characters, so you're capping content size, not clock resolution. CHAR behaves as fixed-length text in other engines, which tempts people to carry old habits across. Don't mix the two mental models. Length limits how much text fits, precision states how finely time was measured.

Before your first load, run one practical check. Compare the source system's clock resolution with your column precision, using real sample values, and confirm the zone variant matches how the business reads the times. Five minutes here prevents a class of bugs that's painful to untangle once history is loaded at the wrong resolution.

Text, Boolean, Binary and Geospatial Types

Four smaller families handle most of what's left after numbers and timestamps. Each has one rule that matters, and one trap for people arriving from other databases.

Text and Boolean

VARCHAR(n) holds text up to 16,777,216 characters, and STRING and TEXT are aliases. The length argument is a real cap. VARCHAR(100) rejects a longer product name at load time, which is what you want, because you'd rather fix a feed than discover truncated names in a catalogue. Snowflake maps CHAR to VARCHAR, so a fixed-width habit from another engine brings no padding benefit here.

BOOLEAN stores TRUE, FALSE or NULL, and that third state is the trap. A flag that's sometimes missing needs three-valued logic in filters. A WHERE clause testing is_active = FALSE won't return rows where is_active is NULL, so counts disagree unless you handle the missing case on purpose.

Binary and Location

BINARY stores raw bytes such as hashes, checksums and encoded payloads. It's the right home for a file fingerprint you'll compare for equality. If people will read the values in reports or support tickets, store the text form instead, because nobody troubleshoots from raw bytes.

GEOGRAPHY holds points, lines and polygons on the Earth's surface and computes distances in meters. A store-locator column should be GEOGRAPHY rather than two FLOAT columns, because distance and containment functions then work correctly without hand-written math. GEOMETRY uses planar coordinates, which suits floor plans, warehouse layouts and grid shapes where Earth's curvature is irrelevant.

Here's a worked example. Store each delivery zone as a GEOGRAPHY polygon, store each customer address as a GEOGRAPHY point, and test points with ST_CONTAINS during load to assign zones. You get zone assignment as a typed, testable step instead of a spreadsheet exercise. Failures, such as a point in no zone, become visible rows you can count.

Size text from the longest value the business accepts, and reject longer input at the source rather than trimming it silently in the pipeline.

Semi-Structured Types Like VARIANT, OBJECT and ARRAY

A vehicle telemetry feed is the cleanest way to see why these types exist. This short clip sets up the working pattern before we walk through a payload.

Say each vehicle sends an event every few seconds with a vehicle ID, a temperature, a location and a firmware version. Next quarter, the device team adds battery voltage and a diagnostic code, without telling you. A rigid table breaks or forces a schema change mid-stream. This is the problem semi-structured types solve.

What Each Type Holds

According to Snowflake's semi-structured data types documentation, VARIANT can hold a value of any Snowflake data type, including nested OBJECT and ARRAY values, OBJECT stores key-value pairs, and each ARRAY element is represented as VARIANT, so an array can mix types and nest extensively. You can convert values explicitly with CAST, the :: operator, or functions such as TO_VARIANT. If you're sourcing sample payloads to test against, you can explore JSON format data options to see how real feeds vary in shape before you commit to columns.

Land the raw event in one VARIANT column called payload. Nothing is lost when new fields arrive, and you keep full source fidelity for replay and debugging. The flexibility is real, but it isn't free, because values inside VARIANT aren't typed for joins and aggregation until you cast them out.

The image below captures the everyday reality of this work, a payload on screen and field decisions being made one attribute at a time.

A professional working on a laptop displaying JSON code with sticky notes, symbolizing flexible data structures.

Extract, Then Cast, Then Query

Read fields with colon notation, such as payload:vehicle_id and payload:temperature. Then cast them to operational types before joins, filters, aggregation or downstream publication, for example payload:vehicle_id::VARCHAR and payload:temperature::NUMBER(10,2). Skip the cast and you're comparing VARIANT values, which invites the implicit conversion problems covered later.

The architecture that works in practice has two layers. Keep raw events in VARIANT while the source schema evolves, then project frequently queried attributes into typed columns or views. Analysts query clean, typed columns. Engineers keep the original payload when a question arrives about a field nobody promoted yet.

Snowflake also supports structured ARRAY and OBJECT types, including arrays constrained to element types such as INTEGER, and permits casting between structured and semi-structured representations. Use those constraints when contracts are stable and validation is worth the rigidity. Retain plain VARIANT for payloads that vary.

Rule of thumb: If a field appears in most queries, promote it to a typed column. Typed columns are faster to query and easier to govern, so VARIANT should hold the long tail, not your core facts.

Casting Rules and Implicit Conversions

Return to that mixed-source price feed. One system sends prices as text, another sends them as floats, and your load relies on automatic conversion. No error appears. Instead, two sources land with different scales in the same column, and finance finds totals that almost reconcile. Almost is the expensive outcome.

Explicit Versus Implicit

Explicit casting means you name the target, using CAST or ::, so the result type is your decision. Implicit casting means Snowflake converts compatible values automatically during expressions such as arithmetic or comparisons, when a function or operator requires another type. Convenience is the benefit. Silent information loss is the price.

According to Snowflake's data type conversion documentation, when implicit conversion changes a nonnumeric value into a numeric value, Snowflake returns NUMBER(18,5) by default. That default can change precision without any warning in your code. Converting a FLOAT to an integer removes the decimal portion through rounding, and converting a DATE to TIMESTAMP_NTZ fills time fields with 00:00:00.000.

Five Conversions That Cause Real Errors

ConversionResult to watch forSafer habitFLOAT to INTEGERDecimal part removed by roundingCast to NUMBER(p,s) with the scale you needDATE to TIMESTAMP_NTZTime fields set to 00:00:00.000Pass the intended time explicitlyNonnumeric text to number (implicit)Returns NUMBER(18,5) by defaultUse TRY_CAST or an explicit NUMBER(p,s)VARIANT field via colon notationStill VARIANT until castCast with :: before joins or filtersMixed-source price columnScales differ between sourcesCast every source to one NUMBER(p,s) on load

The DATE row deserves attention. A daily cut-off built on converted dates treats every event as occurring at midnight, so events stored just after midnight fall on the wrong side of the boundary. Reports shift by a day for a slice of rows, which looks like a data problem and is really a type problem.

The mixed-source row is the general case. Each source looks fine alone, because each converts consistently within itself. They only disagree with each other, so single-source tests pass and production totals drift. That's why spot-checking one feed never catches this class of bug.

Build one habit and most of this disappears. Name the target type in every conversion that feeds a join, filter or published table. Then run a short test before go-live. Convert a real sample, compare each result against the source value, and check the awkward cases on purpose, the price with three decimals, the timestamp at midnight, the missing flag. If the sample survives, the pipeline usually does too.

Storing Files with the FILE Data Type

The assumption to challenge is that everything flexible belongs in VARIANT. A scanned contract, a damage photo and a call recording aren't JSON with unusual fields. They're files, and treating them as oversized text creates governance and processing problems that surface months later.

A wooden desk with a laptop, annual report, contract, digital recorder, and photos representing unstructured data types.

What FILE Is, and What It Isn't

Snowflake classifies unstructured data as having no inherent schema and provides a dedicated FILE data type, and such data must first be stored on an internal or external stage, according to Snowflake's unstructured data types documentation. That staging step is the fundamental difference. Semi-structured JSON sits in a VARIANT column and can be queried through field extraction, while a PDF can't be meaningfully stored as a larger VARCHAR or as a VARIANT field.

FILE also isn't a replacement for VARIANT. The type choice affects metadata design, access controls, processing pipelines and lineage, which matters increasingly for agentic AI, retrieval workflows and multimodal analytics. Snowflake separately lists REST API support, directory tables and secure sharing for unstructured data, a sign that file management is a distinct platform concern rather than a niche SQL feature.

The Reference Plus Extraction Pattern

The design that holds up stores two things. First, a file reference, meaning stage path, file name, checksum and content version, alongside structured business keys such as customer ID or contract number. Second, extracted content, meaning text, fields or embeddings, stored as typed or semi-structured data that queries can use.

Four questions decide whether this works in practice:

  • File or extracted text only: Keep the file when it's evidence, when extraction might improve, or when reprocessing is likely. Keep only extracted text when the file has no retention value.
  • Source identity and version: Store checksum and version with the reference, so you can prove which content produced which extracted fields.
  • Joining to structured keys: Put customer or contract keys on the reference row at ingest, not in a filename convention someone must parse later.
  • Access and lineage: Controls and lineage should follow the file reference, so a restricted document doesn't leak through an unrestricted extraction table.
Keep the file for evidence and reprocessing, and keep extracted attributes for queries. Asking either one to do both jobs is where file architectures break down.

Schema Design Choices for Performance and Governance

Type decisions made column by column only pay off when they form a consistent schema. Four practices connect the earlier rules into something a team can maintain, and each one prevents a specific, common failure.

Four Schema-Level Practices

Type everything that's queried, joined or filtered. Reserve VARIANT for payloads that vary. Every field that carries business logic deserves a real type, because typed columns prune, join and aggregate predictably, and they fail loudly when a feed changes shape.

Pick precision from the source, not from habit. NUMBER precision and timestamp precision should state the accuracy the source provides. A schema that documents accuracy stops analysts from trusting padded digits and stops engineers from re-litigating the same question every project.

Define casts once, in views or load transformations. If every query casts payload fields differently, downstream users get different types and eventually different numbers. One cast defined in one place means one result everyone shares, and one place to fix when a source changes.

Separate sensitive attributes into their own typed columns. Personal identifiers and payment details need masking and tokenization to target them directly. We use data masking and tokenization, along with network security improvements, to help protect sensitive information, and our data protection includes encryption of data at rest and encryption of data in transit. Teams reviewing controls in regulated settings often start with bank audit insights from Visbanking to see how auditors expect sensitive fields to be isolated.

Before and After

Consider a single VARIANT column holding names, emails and prices together. You can't mask the email without touching the price. You can't type the price without parsing the whole payload in every query. Governance becomes all or nothing, so in practice it becomes nothing.

Split that into three typed columns and the picture changes. The email gets its own masking rule, the price gets NUMBER(10,2) and exact arithmetic, and the name gets a length that reflects what the business accepts. Clear type boundaries make policies easier to apply, which matters more each year. Organizations doubled their use of key governance features in Snowflake's Data Cloud in 2024, according to Snowflake's Data Trends Report 2024, so schemas designed for policy enforcement age better than schemas that treat governance as an afterthought.

At each schema change, review four things before you merge. Check the types, the precision on numeric and timestamp columns, the casts in load transformations and views, and the sensitive-column tags. That short review catches most silent-change bugs while they're still cheap.

Choose Data Types Before You Load Data

Run this checklist on one real table before its first production load. It takes under an hour and prevents the silent errors that are hardest to unwind. Teams formalizing this work often compare their checklist against the skills for data engineering roles to confirm who should own each step.

  1. Sketch each source column and mark it as exact decimal, approximate number, text, timestamp, semi-structured payload or file.
  2. Write NUMBER(p,s) for each exact decimal, from the largest legitimate value and the fractional digits the business needs.
  3. Match timestamp precision to the source clock using the precision table, and confirm the time zone variant.
  4. Decide per payload whether fields are stable enough for typed columns or should stay in VARIANT behind extraction views.
  5. Decide per file whether to store the file, its extracted text or both, with business keys on the reference row.
  6. Run a sample load with explicit casts and compare results against source values, including midnight timestamps and three-decimal prices.
  7. Write each decision into the schema documentation before the first production load.

Production platforms reward this discipline at scale, as shown by large-scale EMS implementations on Snowflake where telemetry types and precision had to be right from the first load. If an outside review helps, Faberwork LLC designs Snowflake data warehouse architecture, builds transformation and integration pipelines, maintains and troubleshoots existing Snowflake implementations, and can review a schema before it reaches production, with SnowPro Certified Developers on the team.


Pick one table you're loading this week and run the seven steps before the next run. If you'd like a second set of eyes first, contact Faberwork LLC for a schema review, and we'll check your types, precision and casts against your real source data before they reach production.

NOVEMBER 04, 2026
Faberwork
Content Team
SHARE
LinkedIn Logo X Logo Facebook Logo