HomeInterview QuestionsIn Snowflake, how do you decide which data type to…

In Snowflake, how do you decide which data type to implement, why did you pick that type, and which storage format did you use?

🟡 Medium Conceptual Mid level
1Times asked
Jul 2026Last seen
Jul 2026First seen

💡 Model Answer

Choosing a data type in Snowflake starts with understanding the data’s semantics and usage patterns. For textual data, VARCHAR is the default; if you know the maximum length, you can specify VARCHAR(n) to reduce storage. Numeric values can be stored as NUMBER, which supports arbitrary precision; for fixed‑scale financial data, you might use NUMBER(18,2). Dates and timestamps use DATE, TIMESTAMP_NTZ, TIMESTAMP_TZ, or TIMESTAMP_LTZ depending on whether you need time‑zone awareness. Snowflake also offers semi‑structured types like VARIANT, OBJECT, and ARRAY for JSON, Avro, or Parquet payloads. The decision hinges on query performance, storage cost, and compatibility with downstream tools. For example, storing dates as TIMESTAMP_NTZ avoids unnecessary time‑zone conversions when all data is in UTC. Regarding storage format, Snowflake internally stores data in a columnar format optimized for compression and query acceleration. When loading data, you typically use Parquet or ORC because they preserve schema and support efficient column pruning. If you ingest JSON, you can load it into a VARIANT column and let Snowflake parse it lazily. In my recent project, I chose NUMBER for monetary fields, TIMESTAMP_NTZ for event times, and stored raw logs in Parquet files on S3, loading them into Snowflake via external tables. This combination gave me fast query performance, low storage costs, and easy integration with BI tools.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.

Get Assisting AI — Starts at ₹500