semantica.ingest is the universal entry point for loading data into Semantica:
  • 15+ ingestion adapters: files, web, SQL, Databricks, Snowflake, Kafka, MCP, Git repos, email
  • PyArrow Parquet with column selection and partitioned dataset support
  • XXE-safe lxml XML with optional XSD schema validation
  • ingest() unified dispatcher: auto-detects source type from path or URL
  • Each ingestor returns its own typed object (FileObject, WebContent, TableData, etc.)

Exported Classes

Getting Started

Use FileIngestor for local files: it auto-detects format from the file extension and handles archives:
FileIngestor is always the fastest path for local files. It auto-detects format from extension, handles ZIP/TAR archives automatically, and reads content into .content bytes or the .text property. Use read_content=False when you only need file metadata.
For web, database, or stream sources, each ingestor exposes its own typed method:

Quick Start

1

Ingest local files

2

Connect to a database

3

Feed into the pipeline

Ingestors

FileIngestor

Supported formats: PDF, DOCX, TXT, HTML, JSON, CSV, Excel (XLSX/XLS), PPTX, ZIP/TAR archives.
Glob patterns (e.g. "data/**/*.docx") are not supported. ingest() accepts a file path or a directory path only. To filter by extension inside a directory, use ingest_directory() with the pattern= filter option.

ParquetIngestor

PyArrow-based ingestion for Apache Parquet files, including Hive-style partitioned datasets:
Requires pyarrow: pip install pyarrow.
Use ParquetIngestor instead of FileIngestor for structured analytical data. Parquet ingestion preserves column types (int, float, datetime) that CSV reading loses. Use columns=["id", "text"] to avoid loading unused columns: critical for wide tables with hundreds of columns.

XMLIngestor

XXE-safe lxml-based ingestion with optional schema validation:
XMLIngestor uses lxml with resolve_entities=False to prevent XML External Entity (XXE) injection attacks.
XMLIngestor is XXE-safe by default. Do not use standard xml.etree.ElementTree to pre-parse XML before passing to Semantica: it does not block XXE attacks. XMLIngestor uses lxml with resolve_entities=False to safely parse untrusted XML.

ingest() Unified Dispatcher

ingest() auto-detects source type from the path or URL and routes to the appropriate ingestor. It returns a Dict[str, Any] where the key depends on source type:

ingest() Parameters

FileObject Fields

FileIngestor returns FileObject instances:
To get text from an ingested file, use the .text property:
Skip reading content (useful for directory scanning without loading files):

OntologyIngestor

Ingest existing OWL or RDF ontology files as structured knowledge sources:

Custom Ingestors

Register a custom ingestor function to participate in the full registry:
  • Parse — Parse raw sources into structured text and tables.
  • Pipeline — Orchestrate ingest as the first pipeline step.
  • Snowflake Integration — Snowflake-specific setup and authentication guide.
  • Databricks Integration — Databricks Unity Catalog setup, authentication, and lineage guide.
  • Provenance — Track lineage from ingest through to inference.