Skip to main content

SIFFT

File ingestion pipelines are repetitive and fragile. SIFFT (Spark Ingestion Framework For Tables) is a Python library that aims to:

  • Make file reading format-agnostic with automatic delimiter and header detection
  • Validate data quality with CSVW metadata and constraint checking before it enters your tables
  • Provide consistent error handling across CSV, Excel, TSV, and pipe-delimited files
  • Support schema evolution and merge/upsert operations for Delta tables
  • Reduce boilerplate code for common Spark ingestion patterns

Install

pip install sifft              # Without PySpark (use your Databricks runtime)
pip install sifft[pyspark3]    # With PySpark 3.5 + Delta Lake 3.x
pip install sifft[pyspark4]    # With PySpark 4.x + Delta Lake 4.x

Quick Start

from pyspark.sql import SparkSession
from file_processing import process_file
from dataframe_validation import validate_csvw_constraints
from table_writing import write_table, TableWriteOptions

spark = SparkSession.builder.appName("Pipeline").getOrCreate()

# Read (auto-detects format, delimiter, header)
result = process_file("data.csv", spark)

# Validate (if CSVW metadata exists alongside the file)
if result.metadata:
    report = validate_csvw_constraints(result.dataframe, result.metadata)
    assert report.valid, f"{len(report.violations)} violations"

# Write
write_table(result.dataframe, "catalog.schema.target", spark,
            TableWriteOptions(format="delta", mode="append"))

Features

  • File Processing — CSV, TSV, pipe-delimited, Excel. Auto-detection of delimiters and headers. Checksum-based deduplication.
  • Data Validation — CSVW constraint checking: required, unique, min/max, pattern, enum, primary keys.
  • Table Writing — Delta, Parquet, ORC. Append, overwrite, merge/upsert, schema evolution.
  • File Management — Safe move/list across local, S3, Azure, GCS.
  • Extensibility — Custom format handlers, write modes, and constraint validators.

Documentation

Compatibility

  • Python 3.10+
  • PySpark 3.5.x, 4.0.x, or 4.1.x
  • Databricks / Unity Catalog compatible

Development

just test        # Run tests in Docker
just test-local  # Run tests locally (requires Java)
just --list      # All available commands

Design Decisions

Architecture Decision Records are in design_decisions/.

License

MIT — see LICENSE.

Contributors

  • Iwan Dyke
  • Fahad Khan
  • Michal Poreba

Metadata

Release files for sifft 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sifft 0.9.3
File Size Uploaded
sifft-0.9.3.tar.gz 104.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sifft 0.9.3
File Interpreter ABI Platform
sifft-0.9.3-py3-none-any.whl Python 3 none any Details

Total release size: 152.8 kB

Release files / sifft-0.9.3.tar.gz

Download URL sifft-0.9.3.tar.gz
Size 104.0 kB
Tags Source
SHA-256 checksum
How to use checksums
078a79d86496b04d3492a40281131591420157d4bbd886137e64a62b9a972e28
BLAKE2b-256 checksum
How to use checksums
533225998b4746d2f5a0c50d6434f39c345a6108520d90aa409e5a81ed0ed512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.

Transparency log

Release files / sifft-0.9.3-py3-none-any.whl

Download URL sifft-0.9.3-py3-none-any.whl
Size 48.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a5b6cbff2307a59862d565035600746dc2facfefac04ce72bfe83aa43a294d6
BLAKE2b-256 checksum
How to use checksums
921774e73d9dee7b521371e62f3ee8553a3544eb5bdb1d4d373f2e318e982a52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.9.3 This release

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page