SOL-C01 · Question #193
A company stores unstructured text data (PDFs, DOCX) in an external stage (AWS S3). They want to use Snowflake Cortex's PARSE DOCUMENT function to extract specific information, but are encountering…
The correct answer is B. Pre-process the documents to remove irrelevant sections (e.g., boilerplate text, headers, footers) C. Utilize Snowflake's caching mechanism by storing parsed results in a separate table and E. Implement a robust error handling mechanism to prevent processing from halting due to. Three strategies together address both performance and cost for PARSE_DOCUMENT. Option B (pre-processing documents) reduces input size by stripping boilerplate, headers, and footers before parsing, directly reducing the amount of data Cortex processes and lowering credit…
Question
A company stores unstructured text data (PDFs, DOCX) in an external stage (AWS S3). They want to use Snowflake Cortex's PARSE DOCUMENT function to extract specific information, but are encountering performance issues and high costs. Which of the following strategies could optimize performance and reduce costs when using PARSE DOCUMENT in this scenario?
Options
- AIncrease the size of the virtual warehouse used for processing, even if it means paying for larger
- BPre-process the documents to remove irrelevant sections (e.g., boilerplate text, headers, footers)
- CUtilize Snowflake's caching mechanism by storing parsed results in a separate table and
- DReduce the number of documents being processed in a single batch to minimize memory
- EImplement a robust error handling mechanism to prevent processing from halting due to
How the community answered
(19 responses)- A16% (3)
- B58% (11)
- D26% (5)
Explanation
Three strategies together address both performance and cost for PARSE_DOCUMENT. Option B (pre-processing documents) reduces input size by stripping boilerplate, headers, and footers before parsing, directly reducing the amount of data Cortex processes and lowering credit consumption. Option C (caching parsed results) ensures that documents already processed are not re-parsed on subsequent queries - storing results in a Snowflake table and querying from there avoids redundant Cortex calls, which are the primary cost driver. Option E (error handling) prevents a single malformed document from halting an entire batch job, improving throughput and preventing wasted compute on retries. Option A (increasing warehouse size) increases cost rather than reducing it. Option D (reducing batch size) helps with memory but does not address the fundamental cost issues.
Topics
Community Discussion
No community discussion yet for this question.