nerdexam
Snowflake

DEA-C02 · Question #22

A Data Engineer needs to ingest invoice data in PDF format into Snowflake so that the data can be queried and used in a forecasting solution. What is the recommended way to ingest this data?

The correct answer is D. Create a Java User-Defined Function (UDF) that leverages Java-based PDF parser libraries to. PDFs are binary files containing unstructured data that cannot be parsed by Snowflake's native ingestion mechanisms, so a Java UDF using a PDF parser library (such as Apache PDFBox) is the correct approach - it allows you to extract structured invoice fields (amounts, dates…

Data Transformation

Question

A Data Engineer needs to ingest invoice data in PDF format into Snowflake so that the data can be queried and used in a forecasting solution. What is the recommended way to ingest this data?

Options

  • AUse Snowpipe to ingest the files that land in an external stage into a Snowflake table.
  • BUse a COPY INTO command to ingest the PDF files in an external stage into a Snowflake table
  • CCreate an external table on the PDF files that are stored in a stage and parse the data into
  • DCreate a Java User-Defined Function (UDF) that leverages Java-based PDF parser libraries to

How the community answered

(25 responses)
  • A
    16% (4)
  • B
    4% (1)
  • C
    4% (1)
  • D
    76% (19)

Explanation

PDFs are binary files containing unstructured data that cannot be parsed by Snowflake's native ingestion mechanisms, so a Java UDF using a PDF parser library (such as Apache PDFBox) is the correct approach - it allows you to extract structured invoice fields (amounts, dates, vendors) programmatically before or during loading into a Snowflake table.

Why the distractors fail:

  • A (Snowpipe) and B (COPY INTO) both expect structured or semi-structured data (CSV, JSON, Parquet, Avro, etc.) - neither can interpret the binary content of a PDF file.
  • C (External Table) can reference files in a stage, but an external table still requires a format Snowflake can parse; PDFs have no native format handler, so Snowflake cannot query raw PDF bytes as tabular data.

Memory tip: Think "PDF = custom parsing required." Whenever a source format lacks a native Snowflake parser, reach for a UDF - Java UDFs are especially powerful because they can import third-party JVM libraries like PDFBox to handle complex binary formats before the data ever lands in a table.

Topics

#User-Defined Functions (UDFs)#PDF Parsing#Data Ingestion#Unstructured Data Processing

Community Discussion

No community discussion yet for this question.

Full DEA-C02 Practice