Associate Exam and Answers |Latest
Update|
How to directly query files - ✔✔SELECT * FROM <data format>.`<path to directory>/<file
name>`
How to query a directory of files - ✔✔Assuming all of the files in a directory have the same
format and schema, all files can be queried simultaneously by specifying the directory path
rather than an individual file.
SELECT * FROM <data format>.`<path to directory>`
How to extract text files as raw strings - ✔✔SELECT * FROM text.`<path to directory>`
How to extract the raw bytes and metadata of a file - ✔✔SELECT * FROM binaryFile.`<path to
directory>`
How to define common table expressions - ✔✔Common table expressions (CTEs) are perfect
when you want a short-lived, human-readable reference to the results of a query.
WITH <cte name>
AS (SELECT * FROM <data format>.`<path to directory>`
How to define a view - ✔✔CREATE OR REPLACE VIEW *IF NOT EXISTS* <view name>
AS SELECT * FROM ...
OR REPLACE = If a view of the same name already exists, it is replaced.