View on GitHub

Documents to data: OCR, Parquet and a vector database

Data engineering lesson ready

A folder of scanned invoices becomes a table you can query and a knowledge base an AI can search.

The idea

Part 1 turns invoice images into data: OCR reads the pixels into text, a parser pulls out vendor, date and total into JSON, and the records land in Parquet, ready for SQL with DuckDB.

Part 2 embeds the same documents into vectors and stores them in LanceDB, so a question like ‘which invoice was for printer toner?’ finds the right document by meaning, with a citation, ready for a RAG prompt.

What the lesson will build

Key ideas

The video

The lesson is ready: code and a line-by-line walkthrough in data-engineering/build-lab-02-documents-to-data/.


All topics · Suggest a topic