← Provider Docs DagForge Docs
Airflow Summit 2026 is coming August 31 - September 2 in Austin, TX. Register now to secure your spot!

airflow.providers.common.ai.example_dags.example_document_loader

Example DAGs demonstrating DocumentLoaderOperator usage patterns.

Each DAG covers a single pattern. The hook docs reference these via .. exampleinclude:: so the runnable snippets stay in sync.

Functions

example_document_loader_basic()

Parse a single local file -- the operator infers the format from the suffix.

example_document_loader_directory()

Walk a directory recursively, only picking up PDFs and Markdown.

example_document_loader_bytes()

Feed raw bytes from an upstream hook (e.g. an S3 download) into the parser.

example_document_loader_json_field()

Read an array of records, embedding only the body field per item.

example_document_loader_cloud_uri()

Read PDFs directly from S3 -- no separate download step.

Module Contents

airflow.providers.common.ai.example_dags.example_document_loader.example_document_loader_basic()[source]

Parse a single local file – the operator infers the format from the suffix.

airflow.providers.common.ai.example_dags.example_document_loader.example_document_loader_directory()[source]

Walk a directory recursively, only picking up PDFs and Markdown.

airflow.providers.common.ai.example_dags.example_document_loader.example_document_loader_bytes()[source]

Feed raw bytes from an upstream hook (e.g. an S3 download) into the parser.

airflow.providers.common.ai.example_dags.example_document_loader.example_document_loader_json_field()[source]

Read an array of records, embedding only the body field per item.

Every other key (title, author, published_at, …) lands in metadata so it stays available for filtering or display.

airflow.providers.common.ai.example_dags.example_document_loader.example_document_loader_cloud_uri()[source]

Read PDFs directly from S3 – no separate download step.

Was this entry helpful?