Verify a data contract
Use a Python API to verify data contract checks programmatically with Soda.
Prerequisites
Verify a data contract via API
name: local_postgres type: postgres connection: host: localhost database: yourdatabase username: ${POSTGRES_USERNAME} password: ${POSTGRES_PASSWORD}from soda.contracts.contract_verification import ContractVerification, ContractVerificationResult contract_verification_result: ContractVerificationResult = ( ContractVerification.builder() .with_contract_yaml_file('soda/local_postgres/public/customers.yml') .with_data_source_yaml_file('soda/local_postgres/data_source.yml') .execute() ) print(str(contract_verification_result))
Review contract verification results
Output
Meaning
Action
Method
About data source configurations
Verify data contracts with Spark
Validate data contracts
Add a check identity
Skip checks during contract verification
Go further
Last updated
Was this helpful?
