QuestionQ46

VerifiedSnowflake Document AI

A Gen AI Specialist uploaded a PDF named Timesheet_report.pdf to a Snowflake stage. The PDF includes a table with the following structure:

Question Image

The Specialist then runs a command to extract the document’s content in Markdown format, preserving the table structure:

The Specialist then runs a command to extract the document’s content in Markdown format, preserving the table structure:

Question Image

What is the output of this command?

Question Image

Question Image

Explanation

SNOWFLAKE.CORTEX.PARSE_DOCUMENT with {'mode': 'LAYOUT'} extracts the document's text together with its layout structure, and its content field returns that text as Markdown. Tables are preserved as Markdown pipe tables (header row, alignment separator row, then one pipe-delimited row per record), which is exactly what selecting :"content" produces here. Plain unstructured text without table delimiters is what the default OCR mode would yield, and PARSE_DOCUMENT never emits CSV-style quoted rows or a JSON array of row objects in its content output.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!