Snowflake Data Type Reference for Schema Design
|
8
min read

The most popular advice about a Snowflake data type is also incomplete: choose the type that most precisely describes the value. Semantic correctness matters, but production schemas don't run in a vacuum. A type changes how predicates behave, how effectively Snowflake can prune micro-partitions, how joins compare values, how dashboards spend compute, and how observability tools interpret drift.
A VARIANT column can preserve an evolving payload elegantly, yet force repeated extraction and conversion in critical reporting paths. A timestamp can represent the right business meaning while still creating confusing session-time behavior. A broad numeric or string definition can accept today's data and make tomorrow's monitoring less useful. Good schema design balances correctness, performance, cost, and operational visibility.
Table of Contents
Why Snowflake Data Type Choices Matter Beyond Modeling
Precision can create operational friction
Observability begins with stable types
Numeric and String Data Types Explained
Fixed point versus floating point
String types are flexible, not permission to be careless
Date, Time, and Timestamp Types for Temporal Data
Match the type to the event contract
Timezone behavior also affects filtering
Semi-Structured and Structured Data Types
Structured types make contracts visible
A hybrid pattern works well
Casting and Conversion Rules You Need to Know
Safe patterns and dangerous shortcuts
How Data Types Affect Query Performance and Cost
Pruning and clustering are type-sensitive
Profile the actual workload
Schema Design Best Practices for Production Workloads
Design by table role
Make schema evolution deliberate
Common Data Type Mistakes and How to Fix Them
Silent acceptance is still a failure
Connecting Data Types to Data Quality and Observability
Build monitoring around type behavior
Quick Reference for All Snowflake Data Types
Why Snowflake Data Type Choices Matter Beyond Modeling
A Snowflake data type is part of your execution design, not just your data dictionary. The choice determines whether a filter can use a simple, predictable predicate or must inspect nested content, cast values at runtime, or reconcile incompatible representations across tables. Those operations affect scan work and can make a well-written dashboard slower than its SQL suggests.
Snowflake's release history makes this broader view clear. Boolean support was introduced only for accounts provisioned after January 25, 2016, a useful milestone in the platform's type history, while the current model includes temporal types such as DATE, DATETIME, and interval types, alongside scalar, semi-structured, and structured families. The platform has grown from basic value storage into a type system intended for modern analytical workloads, so type decisions deserve architectural treatment. Snowflake's data-type reference documents that evolution.
Precision can create operational friction
The most expressive type isn't automatically the best production type. In high-volume BI and observability workloads, a simpler representation can make filtering, clustering, joining, and validation easier to reason about. That doesn't mean choosing a less accurate type when accuracy is required. It means separating business semantics from unnecessary representational complexity.
For example, an event identifier that's always an integer should not become a floating-point value merely because an upstream file labels every field as numeric. Conversely, a financial amount shouldn't be converted to an approximate type for convenience. The right decision preserves the required meaning while avoiding work that downstream queries and controls don't need.
Practical rule: Treat every type review as both a modeling review and an execution review. Ask what the column means, how it will be filtered, how it will be joined, and how its quality will be monitored.
Observability begins with stable types
Monitoring systems need consistent distributions, null behavior, ranges, and structural metadata. If a value moves between string, number, and timestamp representations across loads, a data-quality alert may describe the symptom without revealing the cause. A stable native type gives validation rules and anomaly baselines a clearer signal.
For teams designing a wider warehouse standard, digna's Snowflake schema guidance is a useful companion to the modeling work. The key principle is simple: choose types that remain dependable for both consumers and the systems watching those consumers.
Numeric and String Data Types Explained
Numeric and string choices usually look straightforward until a table becomes a shared dependency. Snowflake supports fixed-point numbers through NUMBER, DECIMAL, and NUMERIC. These names represent the same general fixed-point family, with precision describing the total number of digits and scale describing digits after the decimal point.
Use fixed-point types for values where exactness matters, such as prices, balances, rates, and measured quantities that must reconcile. Integer aliases, including INT, INTEGER, BIGINT, SMALLINT, TINYINT, and BYTEINT, are convenient names for whole-number use cases. Snowflake also supports FLOAT, FLOAT4, FLOAT8, DOUBLE, DOUBLE PRECISION, and REAL for approximate floating-point values. They fit scientific measurements and calculations where approximation is acceptable, not accounting fields that must tie out exactly.

Fixed point versus floating point
A practical schema review should answer three questions:
Does the value need exact comparison? Choose a fixed-point type when equality, reconciliation, or auditability matters.
Does the value represent a scientific approximation? A floating-point type may be appropriate when small representation differences are acceptable.
Will the value join or filter frequently? Keep both sides of the relationship in compatible native forms rather than casting one side inside every query.
Aliases improve compatibility with tools and existing SQL conventions, but they don't remove the need to document the intended range and precision. A column defined for whole-number identifiers should have a clear contract, even if the selected Snowflake alias is broad enough to accept more values.
String types are flexible, not permission to be careless
VARCHAR is Snowflake's variable-length string type. STRING and TEXT are compatibility-oriented aliases, while CHAR and CHARACTER represent fixed-length string semantics. Declared length should reflect the contract you want to enforce, but Snowflake stores strings efficiently regardless of the declared maximum length. That makes a large declaration convenient, yet it can weaken schema communication and make profiling less useful.
For a customer code, status, or source-system category, a documented VARCHAR contract is easier to validate than an unconstrained field. For free-form descriptions, flexibility is usually more important than a narrow limit. The distinction is operational: strict typing catches bad input early, while flexible typing reduces ingestion friction but pushes more responsibility into validation and monitoring.
A common production pattern is to land raw identifiers as strings only when source inconsistency requires it, then normalize them into native numeric or temporal columns in a curated layer. Don't make every downstream analyst repeat the same cast.
Date, Time, and Timestamp Types for Temporal Data
Temporal modeling fails when a column's clock is undefined. Snowflake provides DATE for calendar dates, TIME for time-of-day values, and DATETIME for combined date and time. Its TIMESTAMP family includes TIMESTAMP_NTZ, TIMESTAMP_LTZ, and TIMESTAMP_TZ. The choice affects joins, filters, clustering behavior, and whether data-quality checks can identify a shifted event.
TIMESTAMP_NTZ stores a wall-clock timestamp without timezone semantics. Use it when the source has already normalized values and the absence of timezone meaning is intentional. It becomes risky when users compare values from different regions as though they represented the same instant. TIMESTAMP_LTZ displays a timestamp in the session timezone, which supports localized presentation but can produce different visible dates for different users. TIMESTAMP_TZ preserves timezone-aware behavior and is generally better when the source offset or timezone carries business meaning.

Match the type to the event contract
Use DATE for invoice dates, reporting dates, or service dates when time of day is irrelevant. Use TIME for schedules and daily operating windows. Use a timestamp for events, ingestion records, status transitions, and slowly changing dimension boundaries.
History tables need one documented convention for effective-start and effective-end fields. Snowflake's point-in-time history documentation describes fields such as _effective_start_timestamp and _effective_end_timestamp, with history tables preserving change records while snapshot tables retain current best-known values. The same design supports reconstructing when a value became valid instead of showing only its current state. Snowflake's historical-data documentation describes an ACS example where 5-year estimates use 60 months of collected data. For a broader explanation of this pattern, see Snowflake historical data practices.
Timezone behavior also affects filtering
Session-dependent display can create apparent date shifts during investigation and can cause monitoring rules to report false anomalies. Standardize ingestion, make presentation-time conversion explicit, and retain the source timezone or offset when it is part of the event contract.
Type selection also affects physical behavior. A timestamp expression wrapped in repeated casts can make filtering and pruning harder to reason about, while consistent event columns give clustering and query diagnostics a clearer signal. Validate the chosen representation with representative filters and inspect query behavior rather than assuming one timestamp variant always performs best. The production lesson is direct: temporal semantics, pruning, clustering, and observability belong in the same schema discussion.
Semi-Structured and Structured Data Types
Snowflake's semi-structured family centers on VARIANT, OBJECT, and ARRAY. VARIANT can hold a value of another Snowflake data type, including an OBJECT or ARRAY. OBJECT represents key-value pairs, while ARRAY represents ordered collections. Snowflake groups these types because they can combine into hierarchical structures, although its documentation notes that OBJECT is, strictly speaking, the semi-structured type with the characteristics of a true semi-structured data type. Snowflake's semi-structured type documentation explains that distinction.
VARIANT is valuable at ingestion boundaries. APIs, event streams, and vendor payloads often evolve faster than curated table contracts. Preserving the raw shape lets engineers inspect new attributes without blocking the landing process. The cost appears later, when analysts repeatedly extract paths, cast values, flatten arrays, or join nested fields without a stable relational projection.

Structured types make contracts visible
Snowflake also supports structured ARRAY, OBJECT, and MAP types with fixed Snowflake element or key-value typing. These structured types became generally available on May 31, 2024, according to Snowflake's structured data-type documentation. A structured array declares the element type, while structured objects and maps define their contained types instead of leaving values as unrestricted VARIANT content.
That distinction improves governance. Consumers can discover whether a field is numeric, textual, temporal, or another supported type without inferring it from individual rows. It also gives validation logic a stronger contract and can simplify repeated query expressions.
Snowflake exposes metadata for introspection. ELEMENT_TYPES in INFORMATION_SCHEMA or ACCOUNT_USAGE can identify structured array element types, while FIELDS exposes key and value types for structured objects and maps. Use those views in schema checks rather than relying only on application documentation.
A hybrid pattern works well
Keep raw, evolving payloads in VARIANT, then extract stable, frequently queried attributes into native columns or structured values. Use FLATTEN when nested arrays need row-based analysis. Snowflake documents FLATTEN as a table function that produces a lateral view of VARIANT, OBJECT, or ARRAY content, which makes it central to nested-data transformations. The semi-structured querying guide covers that approach.
Recent open-format capabilities also reinforce the need to treat type choice as governance and performance design. The 2026 feature review describes GA VARIANT support for Delta Direct tables and Iceberg v3 capabilities including VARIANT, row lineage, deletion vectors, and geospatial types. Flexibility is expanding, so teams need stronger rules for when flexibility ends and a curated contract begins.
Casting and Conversion Rules You Need to Know
Casting is where a permissive ingestion design meets a strict analytical contract. Snowflake can convert between many type families, but implicit conversion is not a substitute for an explicit data contract. A conversion may fail, change scale, alter formatting, or produce a value that looks valid while no longer representing the source precisely.
Source Type | Target Type | Conversion Type | Risk Level | Notes |
|---|---|---|---|---|
Numeric | String | Explicit or contextual conversion | Medium | Formatting and downstream comparisons need review |
String | Number | Explicit conversion | High | Invalid characters or unsuitable scale can fail |
String | Date or timestamp | Explicit conversion | High | Input format and timezone assumptions must match |
| Native scalar | Explicit extraction and cast | High | Missing, null, or mixed-type paths require handling |
Numeric | Numeric with narrower scale | Explicit conversion | High | Precision or fractional detail can be lost |
String |
| Parsing or conversion | Medium | Treat malformed payloads as rejected or quarantined input |
Use TRY_CAST or the relevant TRY_ conversion function when bad source records shouldn't abort an entire transformation. A null result still needs a control. Count failed conversions, retain the original value where auditability matters, and route invalid records for review instead of accepting them.
Safe patterns and dangerous shortcuts
A safe extraction makes the expected target visible, such as converting a known numeric path from a VARIANT value into an integer or fixed-point number only after checking its presence and shape. A dangerous pattern casts inside a join predicate without checking whether both sources use the same representation. That approach can hide upstream drift and add repeated runtime work.
String-to-date conversions deserve special caution. Define the accepted format at ingestion, reject ambiguous values, and make timezone treatment explicit. Numeric-to-string conversion also needs discipline when the resulting value becomes a key, because formatting differences can break equality even when the underlying numbers are equivalent.
Teams that receive Amazon flat files can use the same principle: profile source columns before loading, define target types deliberately, and keep conversion failures observable. File-based ingestion often exposes inconsistent representations that a loose landing schema can conceal.
How Data Types Affect Query Performance and Cost
Correct semantics do not guarantee efficient queries. Snowflake stores table data in micro-partitions and records metadata that can exclude partitions from a scan. Native dates, timestamps, and numeric columns generally give predicates a clearer path to that metadata than expressions that extract nested values and cast them row by row.
A broad type is not automatically expensive, and a narrow type is not automatically fast. Workload shape determines the trade-off. Preserve the source representation when it carries business context, then expose purpose-built, strongly typed columns for repeated dashboard filters, joins, and aggregations. That design can reduce repeated conversion work without discarding raw evidence.
Pruning and clustering are type-sensitive
Clustering keys should match recurring filter patterns and maintain useful ordering across the table. Inconsistent timestamp representations weaken that benefit. Wrapping a clustering key in a conversion can also limit pruning, as can joining an identifier stored as a string in one table to a number in another.
Recent Snowflake improvements include runtime pruning for some TIMESTAMP_TZ filters and query optimization that can recognize matching plan shapes rather than only identical query text. These capabilities improve execution in applicable workloads, but they do not compensate for ambiguous types, conversion-heavy predicates, or inconsistent join keys.

Profile the actual workload
Use Query Profile to inspect bytes scanned, partitions scanned, filter behavior, joins, casts, and flatten operations. Run the same business query against a native column and against a nested or repeatedly converted expression. Then separate the cause: the type, clustering quality, predicate shape, or unnecessary projection.
Type changes also affect observability. A cast may increase scan work while masking source drift, and a widened string column can allow invalid formats to pass into downstream models. Pair query-profile analysis with Snowflake usage, cost, and performance monitoring from digna to check whether deployment changed warehouse consumption, query behavior, or data-quality signals. The engineering decision remains yours, but monitoring should make its operational effect visible.
Schema Design Best Practices for Production Workloads
A production schema should tell users what values mean and help the platform process them efficiently. Start with the smallest sufficient native type, but don't reduce range or precision to make a definition look tidy. An integer identifier, an exact financial measure, an event timestamp, and a raw payload each need different contracts.

Design by table role
Fact tables benefit from native keys, exact measures, and timestamps that support common time-window filters. Dimension tables need stable identifiers, descriptive strings, and explicit validity boundaries when history matters. Event streams often need an ingestion timestamp, an event timestamp, a source identifier, and a raw payload, with carefully documented differences between those clocks.
Use VARIANT at the edge when source structure is evolving. Extract fields into typed columns when analysts filter, join, aggregate, or validate them repeatedly. Structured OBJECT, ARRAY, and MAP types are a middle option when hierarchy matters but the element and key-value types are known.
Make schema evolution deliberate
A new column can be backward-compatible, while changing a column from string to timestamp can break views, tests, extracts, and monitoring baselines. Store schema metadata, review type changes as migrations, and test representative downstream queries before promotion.
A review checklist should include:
Semantic contract: What does the value represent, and what does null mean?
Predicate behavior: Which filters and joins will use the column?
Quality controls: Which range, format, uniqueness, or relationship checks should run?
Evolution path: What happens when the source adds, removes, or changes a field?
Consumer impact: Which models, dashboards, exports, and alerts depend on the type?
Document the decision in a data dictionary, not only in migration code. digna's schema design material can complement that review by keeping structural and operational concerns in view.
Common Data Type Mistakes and How to Fix Them
A familiar failure starts with a date-only business field loaded as a timestamp. One dashboard converts it into a user session timezone, and records near midnight appear on the adjacent calendar day. The fix is to model a true business date as DATE, or to preserve an event instant with an explicit timezone convention when time really matters.
Another failure appears in finance pipelines that use floating-point values for amounts requiring exact reconciliation. Small representation differences then surface in grouping, equality, or balance checks. Replace the approximate type with a suitable fixed-point definition, backfill carefully, and compare old and new results before switching consumers.
Silent acceptance is still a failure
A broad VARCHAR field can absorb malformed identifiers, mixed casing, and unexpected formats until a downstream join stops matching. Define the target contract, normalize at the curated boundary, and monitor rejected or unparseable values rather than letting them disappear into a generic string column.
VARIANT creates a different kind of degradation. The table loads successfully, but every important query repeatedly extracts paths, casts values, or flattens arrays. Move stable paths into typed columns, retain the raw payload for traceability, and use Query Profile to verify that the transformation reduced unnecessary scan work.
These issues are easier to prevent than repair. Test type assumptions with representative nulls, malformed values, timezone boundaries, mixed numeric formats, and schema changes before the first production load.
Connecting Data Types to Data Quality and Observability
Observability systems can only monitor the contract that the schema exposes. A native numeric column gives a monitoring rule a meaningful range and distribution. A timestamp with a declared convention supports temporal consistency checks. A structured object exposes expected fields more clearly than an unrestricted payload whose shape changes from row to row.
Type drift is especially important because it can look like a business anomaly. A source changing an identifier from numeric to string may create a sudden null rate in a downstream cast. A timestamp format change may shift freshness metrics or cause records to fall outside expected windows. A new nested path can be valuable source evolution, or it can indicate an upstream payload change that no consumer has tested.
Build monitoring around type behavior
Useful controls include:
Conversion failure tracking: Count values that fail safe casts and retain samples for diagnosis.
Temporal consistency: Check event time against ingestion time, validity boundaries, and expected ordering.
Structural drift: Detect added, removed, or retyped columns and nested fields.
Distribution checks: Monitor nulls, ranges, cardinality, and unexpected category changes.
Query behavior: Watch scan volume, runtime variation, and workload changes after schema migrations.
A data-quality platform should connect these signals rather than treating them as isolated alerts. digna provides in-database data validation, anomaly detection, timeliness monitoring, and Schema Tracker capabilities that can identify structural changes, including data type modifications, while keeping execution inside the customer environment. For teams formalizing rule coverage, this guide to data validation rules and continuous data quality offers a practical reference point.
The goal isn't to alert on every schema difference. It's to distinguish an approved migration from an accidental contract break, then show which tables, metrics, and consumers are exposed.
Quick Reference for All Snowflake Data Types
Use this lookup when reviewing a column or writing a schema standard. The aliases below are useful for compatibility, but the intended semantic contract should remain explicit.
Family | Types | Key characteristics | Common use |
|---|---|---|---|
Numeric exact |
| Fixed-point precision and scale | Financial values, exact measures |
Numeric whole |
| Integer aliases for whole numbers | Keys, counts, sequence values |
Numeric approximate |
| Approximate floating-point values | Scientific or approximate measurements |
String |
| Variable or fixed-length text semantics | Codes, labels, descriptions |
Binary |
| Raw binary storage | Encoded or byte-oriented data |
Temporal |
| Date, time, or combined temporal values | Business dates and schedules |
Timestamp |
| Different timezone and session-display behavior | Events, ingestion, validity periods |
Logical |
| True or false values | Flags and state indicators |
Semi-structured |
| Flexible hierarchical content | Raw JSON and evolving payloads |
Structured | Structured | Fixed element or key-value typing | Governed nested data |
Geospatial |
| Spatial data modeling | Geographic and geometric analysis |
The Snowflake native type model separates primitive scalar types from semi-structured and structured types. Snowflake's full data-type reference also documents metadata surfaces such as ELEMENT_TYPES and FIELDS, which are useful when automated checks need to inspect structured content.
A strong default is to land uncertain source data flexibly, curate repeated access paths into native types, and review every type change for pruning, consumer compatibility, and monitoring impact. That approach keeps semantic correctness while avoiding a schema that only looks clean on paper.
digna helps data teams connect Snowflake schema changes with validation, anomaly detection, timeliness, and structural monitoring inside their own environment. If you're standardizing Snowflake data types and want to catch drift before it breaks dashboards or downstream pipelines, visit digna to evaluate the platform for your observability workflow.
See how digna does this in practice: monitoring data quality inside Snowflake.
Frequently asked questions
Which Snowflake data type should I use for numbers?
Use fixed-point NUMBER (or its DECIMAL and NUMERIC aliases) for values that must be exact, such as money and quantities. Reserve FLOAT and DOUBLE for scientific or statistical work where approximation is acceptable, because floating point introduces rounding differences that surface during aggregation and comparison.
What is the difference between VARCHAR and STRING in Snowflake?
They are synonyms — STRING, TEXT and VARCHAR all map to the same variable-length type, and Snowflake stores only the characters you actually write, so a generous length declaration costs nothing in storage. The reason to declare a realistic length anyway is operational: it documents the contract and makes unexpected values visible instead of silently accepted.
When should I use VARIANT instead of structured types?
Use VARIANT where the payload genuinely evolves and you cannot control the producer, typically at the landing layer. Use explicit typed columns for the contracts reporting depends on. The hybrid pattern — land in VARIANT, project typed columns downstream — keeps ingestion flexible without pushing extraction and casting cost into every query.
How do Snowflake data types affect query performance and cost?
Types determine how well micro-partition pruning and clustering work and whether predicates need conversion before comparison. Casting a column inside a WHERE clause commonly prevents pruning, so Snowflake scans far more data than necessary and the query consumes more credits for the same answer.
How do data types affect data quality monitoring?
Stable, specific types make deviation meaningful: monitoring can compare distributions, null rates and value ranges against a known contract. Over-permissive types accept malformed values without complaint, so problems stay invisible until someone questions a number in a report.



