You are on page 1of 5

ESS-DWW

Data Warehousing Workshop (Badge 1)

Show course content navigation

Course

Lesson …

🥋 Cre…

▪️

🥋 Look Inside the JSON File


Notice the square bracket that surrounds the author records. This could cause the same

issues we saw with the XML file. It could cause all the data to end up in a single row, but this
time we're going to change a setting in the FILE FORMAT we create. We're going to tell the
FILE FORMAT that it should ignore that first set of square brackets, and treat the curly
brackets as the row delineator.
 

🥋 Create a Table & File Format for Raw JSON Data


// JSON DDL Scripts

USE LIBRARY_CARD_CATALOG;

// Create an Ingestion Table for JSON Data


CREATE TABLE "LIBRARY_CARD_CATALOG"."PUBLIC"."AUTHOR_INGEST_JSON"

"RAW_AUTHOR" VARIANT

);

//Create File Format for JSON Data

CREATE FILE FORMAT "LIBRARY_CARD_CATALOG"."PUBLIC".JSON_FILE_FORMAT

TYPE = 'JSON'
COMPRESSION = 'AUTO'
ENABLE_OCTAL = FALSE
ALLOW_DUPLICATE = FALSE

STRIP_OUTER_ARRAY = TRUE

STRIP_NULL_VALUES = FALSE

IGNORE_UTF8_ERRORS = FALSE;

🔍
1/1 point (ungraded)

Which file format property do you think has the power to ignore the square brackets as a row
delimiter?

COMPRESSION

ENABLE_OCTAL

ALLOW_DUPLICATE

STRIP_OUTER_ARRAY

STRIP_NULL_VALUES
INGORE_UTF8_ERRORS

Submit

 Correct (1/1 point)

🎯 Download a JSON File and Load It 


This is  a Challenge Lab so we don't give you step-by-step instructions. You should be able

to load this file* based on what you have already learned. 

Here are some high-level steps: 

1) Download the file named author_with_header.json

2) Upload the data into the table you just created called AUTHOR_INGEST_JSON. (Be sure

to use the JSON file format!)

3) View the rows in the table. 

*If you have trouble downloading the file, right-click the link and choose "Save link as..."

🥋 View the JSON Rows


© All Rights Reserved

Snowflake Education Services includes Instructor-Led Training, SnowPro Certifications, and this online, on-
demand educational courses website. Our on-demand courses are branded as "Snowflake University."
Snowflake University (aka Uni) offers a badge program called Hands-On Essentials as well as other courses.

You might also like