Releases: datacontract/datacontract-cli
Releases · datacontract/datacontract-cli
Release list
v1.1.1
[1.1.1] - 2026-08-14
Added
- SQL quality rules support the
${dataset},${project},${catalog}, and${database}placeholders for the server's values datacontract test --metadata-onlyruns only checks that read the schema (field presence and types) and reports checks that read row values as skippeddatacontract test --checksaccepts the ODCS termspropertiesandslaProperties, keepingschemaandservicelevelas legacy aliases- Released Docker images are signed with cosign keyless signing, on Docker Hub and the Amazon ECR Public mirror; see Installation for how to verify them
datacontract import pydantic-modelcreates a data contract from Pydantic models
Changed
datacontract export exceluses the ODCS Excel template bundled with the CLI instead of downloading it, so the export works offline; use--templatefor a custom template- The OpenAPI document of
datacontract apireports the CLI version, describes every endpoint, parameter, and response model, and names its operationstestDataContract,lintDataContract,exportDataContract, andchangelogBetweenDataContracts DATACONTRACT_CLI_API_KEYnow also protectsPOST /lintandPOST /export, which previously answered without an API key- Test results name the check fields
qualityIdandfailedSamplesinstead ofquality_idandfailed_samples; the old names are deprecated, but still accepted as input and still written next to the new ones datacontract import unityno longer writes thedatabricksTypecustom property, which duplicatedphysicalTypedatacontract export sql --server databrickskeeps the declared length ofvarchar(n)andchar(n)instead of exportingSTRING
Fixed
datacontract testfor API servers withdelimiter: arrayno longer fails JSON schema validation withdata must be object(#1495)POST /exportanswers422instead of500when the posted data contract cannot be parseddatacontract testfor Databricks no longer fails all checks of a model with aGEOGRAPHYorGEOMETRYcolumn (#1483)datacontract export pydantic-modelno longer emits an unparseable empty class for an object property without properties
v1.1.0
[1.1.0] - 2026-08-04
This release drops the pyspark compile-time dependency. The server types dataframe and databricks still work with a provided Spark session.
This removes the JVM dependency, makes the images much, much smaller (Docker image from 777 MB to 277 MB), and many CVEs are resolved.
Added
DATACONTRACT_KAFKA_MAX_MESSAGESlimits how many messagesdatacontract testreads from a topic, andDATACONTRACT_KAFKA_TIMEOUThow long it waits for one
Changed
datacontract testfor Kafka no longer needs PySpark or a Java runtime:datacontract-cli[kafka]now installs confluent-kafka, fastavro, and DuckDB insteaddatacontract-cli[databricks]anddatacontract-cli[dataframe]no longer install PySpark, so they can no longer shadow the build a Databricks Runtime or EMR cluster provides; supply your own PySpark for the Spark session these server types take, anddatabricks-runtimeis now an alias ofdatabricksdatacontract-cli[all]installs no PySpark at all, and so needs no Java runtime- The Docker image ships no JRE and uses a shell-less base image; a derived image can no longer
RUN pip install, sodatacontract dbt test, which needs a dbt adapter, is not available in the container datacontract import unityresolves struct and array columns into nested properties without PySpark installedspark_exporter.to_spark_schema(),to_struct_type(),to_struct_field(), andto_spark_data_type()return the exporter's ownSparkDataTypeinstead ofpyspark.sql.typesobjects; useto_spark_dict()or the newto_pyspark_schema()for real PySpark schemas- Kafka topics with an Avro union of more than one non-null type are now reported as an error instead of being decoded into a struct of the union's members
- Kafka messages without a value (compaction tombstones) are skipped instead of being checked as a row of nulls
Fixed
datacontract export sparkanddatacontract export great-expectations --engine sparkno longer require PySpark to be installedspark_exporter.to_spark_dict()reports which PySpark version lacks a type instead of raising a bareAttributeError, e.g.VariantTypebefore PySpark 4.0datacontract testfor Databricks no longer creates ibis's memtable staging volume, so read-only service principals withoutCREATE VOLUMEpermission can run tests
v1.0.17
[1.0.17] - 2026-08-01
Deprecated
DATAMESH_MANAGER_API_KEY,DATAMESH_MANAGER_HOST,DATACONTRACT_MANAGER_API_KEY, andDATACONTRACT_MANAGER_HOST(and the matchingConfigfields): useENTROPY_DATA_API_KEYandENTROPY_DATA_HOSTinstead
Added
datacontract export htmlfits to datacontract-editor visualizationdatacontract test --filterand--filterstest only the rows matching a SQL predicate, e.g., the latest partition; also available asfilter/filtersquery parameters on the API server'sPOST /test(#1463)- Credentials and connection options can be passed programmatically via
DataContract(config=...)andDataContract.import_from_source(..., config=...), using the typeddatacontract.Configclass or a dict keyed by the environment variable names - The API server accepts per-request credentials on
POST /testviadatacontract-*headers (e.g.datacontract-snowflake-password) - Credentials and connection options can be provided in a YAML config file, via
--config-file(defaults to./datacontract-config.yamlor~/.datacontract/config.yaml) orConfig.from_yaml(), with${VAR}references resolved from the environment - New Snowflake connection options:
DATACONTRACT_SNOWFLAKE_TOKEN,DATACONTRACT_SNOWFLAKE_PASSCODE,DATACONTRACT_SNOWFLAKE_PRIVATE_KEY,DATACONTRACT_SNOWFLAKE_NETWORK_TIMEOUT,DATACONTRACT_SNOWFLAKE_SOCKET_TIMEOUT,DATACONTRACT_SNOWFLAKE_HOST,DATACONTRACT_SNOWFLAKE_PORT - Config options to override the server details from the data contract (host, port, database, schema, catalog, project, dataset, account, service name, staging directory) for Postgres, MySQL, SQL Server, Oracle, Redshift, Snowflake, BigQuery, Databricks, Trino, Athena, and Impala, e.g.
DATACONTRACT_POSTGRES_HOST(#1076) - Data contract locations now support
s3://URLs for commands that read contracts, includinglint,test,export,publish,changelog, andci
Changed
datacontract testagainst Snowflake only forwards the documentedDATACONTRACT_SNOWFLAKE_*options to the connector; unknown variables are ignored with a warningDATACONTRACT_SNOWFLAKE_ACCOUNToverrides the contract'saccountinstead of being ignored with a warningDATACONTRACT_DATABRICKS_SERVER_HOSTNAMEoverrides the contract'shost; previously the contract value won when both were set
Fixed
datacontract dbt syncwrites a description on all dbt tests, not only newly-generated ones
v1.0.16
[1.0.16] - 2026-07-31
Added
datacontract testreads the Avro schema of a Kafka topic from the Confluent Schema Registry viaDATACONTRACT_KAFKA_SCHEMA_REGISTRY_URL,DATACONTRACT_KAFKA_SCHEMA_REGISTRY_USERNAME, andDATACONTRACT_KAFKA_SCHEMA_REGISTRY_PASSWORD(#1347)
Deprecated
DATACONTRACT_SNOWFLAKE_PRIVATE_KEY_PATH,DATACONTRACT_SNOWFLAKE_PRIVATE_KEY_PASSPHRASE, andDATACONTRACT_SNOWFLAKE_CONNECTION_TIMEOUT: useDATACONTRACT_SNOWFLAKE_PRIVATE_KEY_FILE,DATACONTRACT_SNOWFLAKE_PRIVATE_KEY_FILE_PWD, andDATACONTRACT_SNOWFLAKE_LOGIN_TIMEOUTinsteadDATACONTRACT_SQLSERVER_TRUSTED_CONNECTION: useDATACONTRACT_SQLSERVER_AUTHENTICATION=windowsinstead
Fixed
datacontract testagainst a Kafka topic reports Avro messages it cannot decode as such, instead of reading every field as null (#1347)datacontract testconnects to Databricks with an OAuth service principal again, instead of failing withError during request to serveron databricks-sql-connector 4.3.0 and later (#1389)DATACONTRACT_SQLSERVER_TRUSTED_CONNECTIONno longer overrides an explicitly setDATACONTRACT_SQLSERVER_AUTHENTICATION, so a leftover flag cannot silently downgrade an Entra ID login to Windows authenticationdatacontract testpassesDATACONTRACT_IMPALA_AUTH_MECHANISM,DATACONTRACT_IMPALA_USE_HTTP_TRANSPORT, andDATACONTRACT_IMPALA_HTTP_PATHto Impala again, so a Cloudera Virtual Warehouse can be reached instead of failing withTSocket read 0 bytesdatacontract testpasses theserversblockcatalogto Athena again, instead of always queryingawsdatacatalogdatacontract testsupportsDATACONTRACT_BIGQUERY_IMPERSONATION_ACCOUNTagain to impersonate a service accountdatacontract testapplies the documented Snowflake key-pair and timeout variables instead of silently ignoring them: the names they were documented under are not accepted by the Snowflake driver, and now map to the ones that aredatacontract dbt syncdoes not assumeseverity: warnas default anymore: tests now fail with dbt's default severity unless the contract declares a non-blockingquality.severitydatacontract dbt syncno longer drops or misplaces YAML comments that introduce the next column, test, or key
v1.0.15
[1.0.15] - 2026-07-30
Added
datacontract testtreats a server typedmssqlas SQL Server, so contracts carrying the ODBC/dbt spelling are testable (ODCS itself only definessqlserver)datacontract test --quality-idruns a single quality rule by its ODCSquality.id, and--tagruns every quality rule declaring one of the givenquality.tags(#1080)- Test results report the
quality_idandtagsof the quality rule a check comes from - New
databricks-runtimeextra for installing inside a Databricks Runtime, where the cluster already provides PySpark:pip install datacontract-cli[databricks-runtime](#1211 @chifu1234) - The docs Commands reference documents the global options
--versionand--system-truststore, and every import and export guide links to its command page and back datacontract test --dimensionruns only the checks measuring one data quality dimension, e.g.--dimension uniqueness; it matches the ODCSquality.dimensionof a rule and the schema and service level checks that measure the same aspect- New
dataframeextra installs just what testing Spark DataFrames needs:pip install datacontract-cli[dataframe] datacontract import trinocreates a data contract from a Trino catalog, including a ready-to-testserversblockdatacontract import oraclecreates a data contract from a live Oracle database, including a ready-to-testserversblockdatacontract import gcsanddatacontract import adlscreate a data contract from files in Google Cloud Storage or Azure Blob Storage, including a ready-to-testserversblockdatacontract import sqlservercreates a data contract from a live SQL Server database, including a ready-to-testserversblockdatacontract import mysqlcreates a data contract from a live MySQL database, including a ready-to-testserversblock- The documentation has a Release Notes page, generated from this changelog
- The documentation has a guide to migrate contracts from DCS to ODCS
datacontract import s3creates a data contract from files in an S3 bucket, including a ready-to-testserversblockdatacontract import athenacreates a data contract from an Amazon Athena database, including a ready-to-testserversblockdatacontract import unityis nowdatacontract import databricks; theunityformat name keeps working- Redshift infers the authentication method: a password means a database login, otherwise your AWS session is used for IAM.
DATACONTRACT_REDSHIFT_AUTHENTICATIONis no longer required and remains as an override datacontract import postgrescreates a data contract from a live Postgres schema, including a ready-to-testserversblockdatacontract import redshiftcreates a data contract from an Amazon Redshift schema, including a ready-to-testserversblock- Redshift supports IAM authentication, using temporary credentials from your AWS session instead of a database password
datacontract import bigquerynow generates aserversblock, sodatacontract testworks right after the importdatacontract testverifies declared primary keys: each key column must have no missing values, and the key must have no duplicates (a composite key is checked as a tuple) (#1220 @DMZ22)
Fixed
datacontract testcheckedphysicalTypeagainst a same-named table in another schema when one existed, because the native column types were read from the catalog without the contract's schemadatacontract testagainst SQL Server no longer fails every check with "Could not read model" whenserver.schemadiffers from the login's default schemadatacontract-cli[s3]could not rundatacontract test, anddatacontract-cli[gcs]was missing the AWS duckdb extension the GCS connection loads; each data source extra now installs everything its guide needs- The API testing guide stated that no extra is required, but the response is tested with duckdb; it installs
datacontract-cli[duckdb]now datacontract testtold users to installdatacontract-cli[local], an extra that does not exist, anddatacontract-cli[api], which installs the web server rather than a test backend; both now point atduckdbdatacontract import gcswrotetype: gcs, which is not an ODCS server type, so the imported contract faileddatacontract lintanddatacontract test; GCS is now written as ans3server on the Google interoperability endpoint- A data contract could inject SQL into the duckdb session through
endpointUrl, which is interpolated into the statement that stores the S3, GCS and Azure credentials; every value is escaped now - The
datacontract apiserver accepted a local file path as theschemaquery parameter, so a caller could have it read files from the server's filesystem; onlyhttp(s)URLs are accepted now - Trino physical type checks were silently skipped: its
information_schemahas no length or precision columns, so the catalog query failed and a wrongphysicalTypestill passed datacontract import athenaanddatacontract import gluenow honourDATACONTRACT_S3_ACCESS_KEY_IDandDATACONTRACT_S3_SECRET_ACCESS_KEY; the Glue catalog was read with ambient AWS credentials only- S3 now uses an existing AWS session (
aws sso login,AWS_PROFILE, instance roles) when no access key is configured; previously such a setup failed with403 Forbidden - Documented that Athena authenticates with an existing AWS session (
aws sso login,AWS_PROFILE, instance roles); static access keys were presented as the only option regionNamein an Athenaserversblock was ignored, so the region could only be set viaDATACONTRACT_S3_REGIONdatacontract import gluemappedtimestampcolumns tologicalType: dateinstead oftimestamp- Testing and importing Redshift failed with
codec not available in Python: 'UNICODE' - Error messages no longer drop bracketed text such as
pip install "botocore[crt]" - BigQuery export failed on fields with
logicalType: time - Testing Parquet files failed for
numberfields without a declared precision and scale - CSV and JSON imports now write detected formats (
email,uuid,date-time) tologicalTypeOptions.formatinstead of a custom property, so they are validated bydatacontract test - SQL imports now map
TIMEtypes with precision or time zone (e.g.TIME(9)) tologicalType: time; previously the logical type was left unset datacontract test --checks qualitynow runsrowCountquality rules, which were wrongly categorized as schema checksdatacontract import dbtderives the contractidfrom the dbt manifest'sproject_nameinstead of always emitting the placeholdermy-data-contract(#1221 @DMZ22)- A
physicalTypedeclaring a zero scale (NUMBER(38,0),decimal(18,0)) failed against its own column on Snowflake, Oracle, SQL Server and Databricks (#1377 @DMZ22) - Snowflake
physicalTypechecks failed for structuredOBJECT,ARRAYandMAPcolumns, whose fields are now compared field by field instead of as rendered strings (#1377 @DMZ22) datacontract teston Athena failed aphysicalTypewritten in the Hive spellingdatacontract import athenaproduces (array<string>against the reportedarray(varchar)) (#1377 @DMZ22)- A
physicalTypedeclaring fractional seconds (TIMESTAMP_NTZ(9),datetime2(7),timestamp(3)) failed against its own column, so every timestamp column imported from Snowflake failed the firstdatacontract test datacontract testanddatacontract import oracleread Oracle character lengths in bytes, so anNVARCHAR2(50)column was reported and checked asNVARCHAR2(100)datacontract teston Databricks could not check the element types ofARRAY,MAPandSTRUCTcolumns, which the catalog reports as a bare type name
v1.0.14
[1.0.14] - 2026-07-23
Added
datacontract export protobufsupports a customizable package name via theprotoPackageNamecustom property (#1381 @Schokuroff)datacontract export protobufemitsoptionalfor non-required message/object fields (#1390 @Schokuroff)
Fixed
datacontract dbt syncresolves{object}/{property}placeholders in customsqlquality checks to the dbtref()and column name (#1397)- SyntaxWarning during installation:
datacontract/lint/resolve.py:72: SyntaxWarning: 'return' in a 'finally' block return except_messageis handled properly (#1384 @Cupprum) datacontract testno longer reports "backend is not installed" for Athena and other ibis SQL backends whenpackagingis missing from the environment
v1.0.13
[1.0.13] - 2026-07-14
Added
datacontract testreports the nested types of a property that declaresproperties:oritems:as a separate checkdatacontract teston Snowflake verifies thephysicalTypeof nested properties against the real column type
Fixed
datacontract teston Snowflake matches aphysicalTypeagainst the alias the catalog reports, such asBIGINTon aNUMBER(38,0)columndatacontract testno longer reports a mismatch for aphysicalTypewithout precision, such asNUMBERon aNUMBER(12,2)column
v1.0.12
[1.0.12] - 2026-07-10
Fixed
Release v1.0.11
[1.0.11] - 2026-07-09
Added
datacontract importcan now import BigQuery typeINTERVAL(#1367,#1372 @fantastisch)
Fixed
- Failed business definition IRI lookups now suggest the
ENTROPY_DATA_HOSTvalue to set when the IRI host does not match the configured entropy-data host. datacontract testno longer reports a physical type mismatch for BigQuery type aliases, such as aphysicalTypeofINTEGERon anINT64column (#1371 @fantastisch)datacontract testno longer fails withCANNOT_CONVERT_COLUMN_INTO_BOOLon Databricks when a Spark session is used
v1.0.10
[1.0.10] - 2026-07-08
Added
- extended
datacontract dbt sync:- now edits existing properties files (schema.yaml) in-place instead of creating new ones
- preserve manual edits to a properties file
- edit schema incl. descriptions, column types and tags, not only tests
- add
--pruneflag to remove everything that's not specified in the contract (models, tags, checks) - per default, only generated content gets removed - support for multiple contract versions (
versions:block) - possibility to sync multiple contracts at once
- store the contract id and version in the
meta:block
- added
datacontract dbt test: Use localdbtto run all tests that have been generated usingdatacontract dbt syncearlier (scoped to a single data contract, or all data contracts in the opened dbt project)- optionally publish to Entropy Data
Changed
datacontract dbt sync:- no longer executes tests per default (use
--run-testsor rundatacontract dbt testafterwards)
- no longer executes tests per default (use
datacontract testnow verifies a field'sphysicalTypeagainst the column's real native type from the platform catalog (length and precision included), taking precedence overlogicalType(#1354)datacontract testJSON output now includesdatacontractCliVersion(#1353 @hk8suva)datacontract testtype-check errors now report the first failing field and a count of the remaining errors (#1334 @jorgengranseth)
Fixed
datacontract testno longer fails the type check for SQL Serveruniqueidentifier(UUID) columns with "the column type could not be determined" (#1354)datacontract testagainst BigQuery no longer fails SQL quality checks with'RowIterator' object has no attribute 'fetchone'datacontract importagainst BigQuery applies correctlogicalTypefor BigQuery typesTIMESTAMP,DATETIME, andTIME(#1366 @fantastisch)