SnowPro Associate: Platform Question 291
Single answer3.4 Explain how to work with unstructured data.A media company stores product manuals and warranty PDFs in an Amazon S3 bucket. The analytics team wants to make these files available through Snowflake so SQL users can reference the files and downstream applications can securely access them without copying the documents into table columns. Which Snowflake approach best meets this requirement?
- A
Create an external stage that points to the S3 bucket and use directory tables and scoped URLs to reference and securely access the files
- B
Load each PDF into a VARIANT column in a permanent table using COPY INTO so users can query the binary contents directly with SQL
- C
Create a standard internal table and store the S3 object paths as VARCHAR values; Snowflake will automatically resolve and secure access to the files
- D
Use Snowpipe Streaming to ingest the PDF files as rows in a relational table and then grant SELECT on the table to downstream applications
Show answer and explanation
Correct answer: A
Explanation
To work with unstructured data in Snowflake, the core pattern is to store files in a stage, either internal or external, and then use Snowflake features to discover, govern, and access those files. For files already in Amazon S3, an external stage is the appropriate object. Enabling or querying a directory table provides file-level metadata, and Snowflake URL functions such as scoped URLs are used for secure file access. This is the recommended approach when users or applications need to reference unstructured files through Snowflake without loading file contents into regular table columns. By contrast, VARIANT is intended for semi-structured data, and Snowpipe Streaming is not intended for unstructured document files. These behaviors are consistent with Snowflake documentation on stages, directory tables, and unstructured data access patterns.
- A. Correct.
Correct. Snowflake supports working with unstructured data by using stages to reference files stored in cloud storage or internal Snowflake storage. For externally stored files in S3, an external stage can point to the bucket location. A directory table can provide metadata about the files in the stage, and scoped URLs can be generated to securely allow access to specific files. This matches the requirement to make files available through Snowflake without copying document contents into table columns.
- B. Incorrect.
Incorrect. VARIANT is for semi-structured data such as JSON, Avro, ORC, Parquet, and XML, not for storing raw unstructured file binaries like PDFs as a best-practice access pattern. While files can be loaded into tables in some contexts, this does not align with Snowflake's recommended unstructured data workflow, which is stage-based and uses file URLs and directory metadata.
- C. Incorrect.
Incorrect. Storing only object paths in a VARCHAR column does not give Snowflake managed awareness of the files, nor does it automatically secure or resolve file access. Snowflake uses stages, directory tables, and URL functions for governed access to unstructured files. A plain table of paths would require custom handling and would not meet the secure access requirement by itself.
- D. Incorrect.
Incorrect. Snowpipe Streaming is designed for low-latency ingestion of row-based structured or semi-structured data streams into tables, not for managing unstructured files such as PDFs. This option reflects a common misconception that all ingestion features are appropriate for file-based unstructured content.