JDBC
Use JDBC for relational databases when the Spark runtime has the driver, network route and credentials required to read from the source. ContractForge builds the reader contract, records safe metadata and lets write modes handle target semantics.
When to use it
Relational extraction
Use JDBC for PostgreSQL, MySQL, SQL Server, Oracle and compatible managed services.
Watermark columns
Combine source predicates, ContractForge watermarks and deterministic deduplication before merge.
Partitioned reads
Use partition columns, bounds, partitions and fetch size to avoid single-threaded extraction.
Network first
Validate routes, firewalls, security groups, drivers and credentials before tuning the contract.
Runtime requirements
| Requirement | Details |
|---|---|
| JDBC driver | The matching database driver must be installed or available to Spark. |
| Network route | The runtime must reach the database host and port. |
| Credentials | Use Databricks secrets or runtime-managed identity. Do not commit database credentials in contracts. |
| Source permissions | The source user must be allowed to read the selected table/query and metadata needed by the driver. |
Databricks serverless
JDBC on serverless is viable only when three layers are available at the same time: a compatible JDBC driver, a network route to the database endpoint and credentials that the Spark reader can use. ContractForge can build the connector contract and generate RDS IAM tokens, but it cannot bypass missing network routes or missing driver support.
| Concern | What to check | Typical fix |
|---|---|---|
| Driver | No suitable driver, class not found or unsupported connector package. | Use a runtime policy, installed library or cluster type that exposes the database driver. |
| Network | DNS resolves but TCP connection times out, or the database rejects the runtime source. | Configure public access rules, firewall allowlist, PrivateLink, VPC/VNet peering or the workspace network policy. |
| Authentication | Password/token works outside Spark but fails in the job. | Validate secret names, token expiry, SSL options, IAM policy and database user grants. |
| Extraction shape | Reads succeed but are slow or create merge conflicts. | Add predicates, partitioning, fetch size, deterministic deduplication and key quality rules. |