DAA-C01 Question 11
Single answerUnstructuredA retail analytics team stores product images and PDF spec sheets in an internal stage in Snowflake. Analysts need to build a dashboard that shows product attributes extracted from these files, but the business does not want to copy the binary files into relational tables. The team also wants to minimize operational overhead and use Snowflake-native features where possible. Which approach should the team use?
- A
Create a directory table on the stage, define a custom file format for the images and PDFs, and query the files directly with COPY INTO a structured table each time the dashboard refreshes.
- B
Use Snowflake Cortex functions on files referenced from the stage, and store only the extracted structured results in tables or views used by the dashboard.
- C
Load the unstructured files into a VARIANT column with COPY INTO, then use FLATTEN to extract image and PDF attributes for reporting.
- D
Create an external function that downloads each file from the stage to a third-party service, and require analysts to query that service directly for dashboard attributes.
Show answer and explanation
Correct answer: B
Explanation
For unstructured data in Snowflake, a common best-practice pattern is to store files such as images, PDFs, and documents in internal or external stages, then use Snowflake-native capabilities to reference those files and extract structured information for downstream analytics. Analysts typically should not load binary file contents into standard relational tables for reporting. Directory tables help expose staged file metadata, but they do not transform binary content into queryable structured records. Likewise, VARIANT and FLATTEN are designed for semi-structured formats like JSON, Avro, ORC, Parquet, or XML rather than arbitrary binary documents. When the requirement is low operational overhead and a Snowflake-native design, extracting attributes from staged unstructured files and persisting only the resulting structured data is the most appropriate solution. This aligns with Snowflake guidance for unstructured data and AI-driven extraction workflows using staged files.
- A. Incorrect.
Incorrect. A directory table on a stage is useful for listing and managing files, but defining a file format does not make binary image and PDF contents directly queryable as structured rows in the way CSV or JSON files are. Re-running COPY INTO on every dashboard refresh would also add unnecessary operational overhead and conflicts with the requirement to avoid copying binary files into relational tables.
- B. Correct.
Correct. Snowflake supports working with unstructured data stored in stages and can reference those files for AI-powered extraction workflows. A practical pattern is to keep the original files in the stage, use Snowflake-native functions to extract relevant attributes or summaries, and persist only the structured outputs needed for analytics. This meets the requirement to avoid duplicating binary files in tables while minimizing operational complexity.
- C. Incorrect.
Incorrect. COPY INTO is used to load supported structured or semi-structured data formats into tables, but images and PDFs are unstructured binary files and are not loaded into VARIANT for direct FLATTEN-based analysis. FLATTEN works on ARRAY/OBJECT data in VARIANT, not on raw binary image or PDF content.
- D. Incorrect.
Incorrect. While an external function and third-party service could be part of a broader architecture, this approach increases operational overhead and does not align with the requirement to use Snowflake-native capabilities where possible. It also introduces additional dependency management, latency, and governance considerations.