Adapters
Adapters are how ContractForge becomes native on each platform without putting platform code in the core.
The core answers: what does the contract mean?
The adapter answers: can this platform preserve that meaning, and how should it run?
Responsibility split
| Layer | Owns | Does not own |
|---|---|---|
| Core | Contract vocabulary, semantic normalization, capability matching, abstract plans, evidence concepts. | Spark, Databricks SDK, boto3, Azure SDK, Fabric SDK, Snowflake clients or runtime execution. |
| Adapter | Platform capabilities, native rendering, optional execution, SDK integration, credential resolution and platform-specific evidence values. | Changing the contract meaning or silently downgrading semantics. |
Planning statuses
| Status | Adapter behavior |
|---|---|
SUPPORTED | Render or execute normally. |
SUPPORTED_WITH_WARNINGS | Render or execute with explicit warnings in the planning result and review artifact. |
REVIEW_REQUIRED | Produce diagnostics and optional review artifacts, but do not pretend the mapping is fully equivalent. |
UNSUPPORTED | Return blockers and do not generate runnable artifacts for the unsafe behavior. |
Adapter examples
| Adapter | Native implementation surface |
|---|---|
| Databricks | Delta, Unity Catalog, Auto Loader, Lakeflow, Databricks SQL, Asset Bundles, Jobs and Delta-backed evidence. |
| AWS | Glue Spark, Iceberg, Glue Catalog, Lake Formation, S3 artifact publication, Glue job definitions, Terraform/CloudFormation and Iceberg-backed evidence. |
| Fabric | OneLake, Lakehouse tables, Data Pipelines, Dataflow Gen2 and Purview/Fabric metadata. |
| Snowflake | SQL, warehouses, tasks, streams, masking policies, row access policies and audit tables. See Snowflake parity. |
| GCP | BigQuery, Dataproc or Dataflow, GCS, Dataplex and Cloud Logging/Audit Logs. |
Databricks is the reference implementation. AWS and Snowflake now have stable supported surfaces for their documented scopes, with real cross-adapter validation and explicit review boundaries. Future adapters must prove parity through capability declarations, tests and documentation.
For side-by-side adapter guidance, see Test contracts across adapters. It shows the same GeoJSON medallion contracts reused across Databricks, AWS and Snowflake with minimal native binding differences kept explicit at the platform boundary.
What adapters must preserve
Adapters should preserve ContractForge semantics first and choose native implementation second.
Examples:
upsertrequires upsert/merge semantics.scd2requires history semantics, effective dating and current-row behavior.- row filters and column masks require native governance primitives or an explicit review-required mapping.
- quarantine must keep run success/failure separate from quality status.
- evidence must record runs, errors, quality, quarantine, schema changes, lineage, source metadata, governance actions and cost signals where available.
Packaging
Each adapter is published independently:
contractforge-core
contractforge-databricks
contractforge-aws
contractforge-fabric
contractforge-snowflake
Dependency direction is one-way:
adapter -> contractforge-core
contractforge-core -> no adapter dependency
This lets teams install only the adapters they need and lets each adapter move at the pace of its platform runtime.
AWS deployment shape
AWS does not parse YAML contracts inside Glue. The adapter interprets contracts before deployment:
contract bundle
-> render artifacts
-> publish to environment.artifacts.uri
-> materialize Glue job definition
-> create or update Glue job
Use:
contractforge-aws deploy contracts/orders.ingestion.yaml --environment environments/prod.aws.yaml
The environment owns S3 artifact location, Glue role, dependencies and Iceberg warehouse. The ingestion contract remains semantic.
AWS renders review artifacts alongside runtime artifacts:
- deployment manifests record artifact sizes and runtime flow;
- IAM policies derive source, warehouse, artifact, script and dependency boundaries from the contract and environment;
- performance profiles define benchmark cases for mappings such as
hash_diff_upsert; - failure-path projects validate
ctrl_ingestion_errorsand failed run evidence without editing generated Glue code.