Skip to content

Commit

Permalink
add a note about dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
karakanb committed Jan 29, 2025
1 parent 4564e1c commit 7a1026f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/commands/validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ It ensures that the configurations meet specific requirements and are properly c
bruin validate [path to pipelines] [flags]
```
<img alt="Bruin - validate" src="/validate.gif" style="margin: 10px;" />

**Arguments:**

**[path to pipelines]:** Path to the pipeline directory or a specific asset.
- **[path to pipelines]:** Path to the pipeline directory or a specific asset.
Defaults to the current directory (".") if not provided.

**Flags:**
Expand All @@ -24,6 +25,17 @@ Defaults to the current directory (".") if not provided.
| `--exclude-warnings` | | Excludes warnings from the validation output. |


### Dry-run Validation
One of the beneficial features of the `validate` command is the ability to perform a dry-run validation on the destination data platform. This means, effectively Bruin runs a dry-run version of the query to ensure that the query is valid and can be executed on the destination data platform. This gives a very strong peace of mind in terms of the accuracy of the queries from a syntactical and semantical perspective, and also ensures that the query can be executed on the destination data platform.

Dry-run is automatically enabled for BigQuery and Snowflake.

However, there are also scenarios where dry-run is not the best suited tool:
- Dry-run requires all the tables/views to be there, which means if you are running validation on a table that you haven't created yet, it'll fail.
- Due to the same reason, dry-run will also fail if you are adding a new column to a table and its upstream, but you haven't created them in the destination yet.

In the end, it is better to treat dry-run as an extra check, and accept that it might give false negatives from time to time.

## Examples

**1. Validate all pipelines in the current directory:**
Expand Down

0 comments on commit 7a1026f

Please sign in to comment.