Skip to content

add --dry-run flag to contract verify command#2716

Open
bujjibabukatta wants to merge 1 commit into
sodadata:mainfrom
bujjibabukatta:fix/#2491-Trino
Open

add --dry-run flag to contract verify command#2716
bujjibabukatta wants to merge 1 commit into
sodadata:mainfrom
bujjibabukatta:fix/#2491-Trino

Conversation

@bujjibabukatta

Copy link
Copy Markdown

Fixes #2473

Problem

Users running expensive queries (e.g. BigQuery) have no way to preview
the SQL that Soda would execute before incurring costs.

Changes

  • Added --dry-run flag to soda contract verify CLI command
  • When active, builds all SQL queries and logs them with [DRY RUN]
    prefix without executing them against the data source
  • Wired through: cli.py → handlers/contract.py → verify_api.py →
    contract_verification_impl.py via existing
    only_validate_without_execute parameter

Usage

soda contract verify -ds datasource.yml -c contract.yml --dry-run

…to 'soda contract verify' that prints all SQL

queries that would be executed without running them against the data
source. Useful for cost estimation before running expensive queries
(e.g. BigQuery charges per byte scanned).

When --dry-run is passed:
- Queries are built but not executed
- Each SQL query is logged with a [DRY RUN] prefix
- Check results are not evaluated (NOT_EVALUATED)

Fixes sodadata#2473
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


bujjibabukatta seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let soda scan do a "dry run"

2 participants