Home › Interview Questions › How do you load JSON data into a Snowflake table?

How do you load JSON data into a Snowflake table?

🟡 Medium Conceptual Junior level
1Times asked
Oct 2026Last seen
Oct 2026First seen

💡 Model Answer

To load JSON into Snowflake you typically use the COPY INTO command with a JSON file format. First create a file format: CREATE FILE FORMAT my_json_format TYPE = 'JSON'; Then stage the file (internal or external). For an internal stage: PUT file://local/path/file.json @my_stage; Finally run COPY INTO: COPY INTO my_table FROM @my_stage/file.json FILE_FORMAT = (FORMAT_NAME = my_json_format); Snowflake will parse each JSON object into a VARIANT column. If you have a table with a VARIANT column, you can also use SELECT parse_json($1) to extract fields. For continuous ingestion, Snowpipe can automatically load new files as they arrive. Remember to define the target table schema and optionally use a staging table if you need to transform data before loading.

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 on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500