BigData / Apache Parquet Interview Questions
How do you load Parquet files into Snowflake?
Snowflake can query and load Parquet files staged in cloud storage using a two-step approach:
Step 1 — Stage the files (S3, Azure Blob, or GCS external stage):
CREATE OR REPLACE STAGE my_stage
URL = 's3://my-bucket/parquet-data/'
CREDENTIALS = (AWS_KEY_ID='...' AWS_SECRET_KEY='...');
Step 2a — Infer schema and query directly (no table creation needed):
SELECT $1:user_id::INT, $1:revenue::FLOAT
FROM @my_stage (FILE_FORMAT => 'parquet_fmt');
Step 2b — Use INFER_SCHEMA to auto-create table:
CREATE TABLE events USING TEMPLATE (
SELECT ARRAY_AGG(OBJECT_CONSTRUCT(*))
FROM TABLE(INFER_SCHEMA(
LOCATION => '@my_stage',
FILE_FORMAT => 'parquet_fmt'
))
);
COPY INTO events FROM @my_stage FILE_FORMAT = (TYPE = 'PARQUET');
INFER_SCHEMA reads the Parquet footer metadata to derive column names and types automatically, eliminating manual DDL.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
