Skip to content

Commit

Permalink
Add documentation for test command
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannegele committed Nov 17, 2023
1 parent 6751594 commit fada775
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ AUTHOR:
COMMANDS:
init create a new data contract
lint linter for the data contract
test EXPERIMENTAL - run tests for the data contract
test EXPERIMENTAL (soda core integration only) - run quality checks for the data contract
schema print schema of the data contract
quality print quality checks of the data contract
open save and open the data contract in Data Contract Studio
Expand Down Expand Up @@ -162,16 +162,23 @@ OPTIONS:
--help, -h show help
```

#### test (EXPERIMENTAL)
#### test - (Soda Core integration only)
The Soda Core integration requires a Soda Core CLI installation, see https://docs.soda.io/soda-library/install.html

```
NAME:
datacontract test - EXPERIMENTAL - run tests for the data contract
datacontract test - (soda core integration only) - run quality checks for the data contract
USAGE:
datacontract test [command options] [arguments...]
OPTIONS:
--help, -h show help
--file value location of the data contract, path or url (except init) (default: "datacontract.yaml")
--quality-type-path value definition of a custom path to the quality type in your data contract (default: "quality.type")
--quality-specification-path value definition of a custom path to the quality specification in your data contract (default: "quality.specification")
--soda-datasource value data source configured in Soda to run your quality checks against (default: "default")
--soda-config value location of your soda configuration, falls back to user configuration
--help, -h show help
```

#### open
Expand All @@ -188,7 +195,7 @@ OPTIONS:
```


#### diff - EXPERIMENTAL (dbt specification only)
#### diff - (dbt specification only)
```
NAME:
datacontract diff - EXPERIMENTAL (dbt specification only) - show differences of your local and a remote data contract
Expand All @@ -204,7 +211,7 @@ OPTIONS:
--help, -h show help
```

#### breaking - EXPERIMENTAL (dbt specification only)
#### breaking - (dbt specification only)
```
NAME:
datacontract breaking - EXPERIMENTAL (dbt specification only) - detect breaking changes between your local and a remote data contract
Expand Down
10 changes: 5 additions & 5 deletions cmd/datacontract.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func main() {
},
{
Name: "test",
Usage: "EXPERIMENTAL - run quality checks for the data contract",
Usage: "(soda core integration only) - run quality checks for the data contract",
Flags: []cli.Flag{
fileNameFlag,
&cli.StringFlag{
Expand All @@ -145,11 +145,11 @@ func main() {
&cli.StringFlag{
Name: "soda-datasource",
Value: "default",
Usage: "todo",
Usage: "data source configured in Soda to run your quality checks against",
},
&cli.StringFlag{
Name: "soda-config",
Usage: "todo",
Usage: "location of your soda configuration, falls back to user configuration",
},
},
Action: func(ctx *cli.Context) error {
Expand All @@ -176,7 +176,7 @@ func main() {
},
}, {
Name: "diff",
Usage: "EXPERIMENTAL (dbt specification only) - show differences of your local and a remote data contract",
Usage: "(dbt specification only) - show differences of your local and a remote data contract",
Flags: []cli.Flag{
fileNameFlag,
withFlag,
Expand All @@ -191,7 +191,7 @@ func main() {
},
}, {
Name: "breaking",
Usage: "EXPERIMENTAL (dbt specification only) - detect breaking changes between your local and a remote data contract",
Usage: "(dbt specification only) - detect breaking changes between your local and a remote data contract",
Flags: []cli.Flag{
fileNameFlag,
withFlag,
Expand Down
2 changes: 1 addition & 1 deletion quality.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func getQualitySpecification(
return TakeStringOrMarshall(spec), nil
}

// soda cli checks
// soda core checks

func sodaQualityCheck(qualitySpecFileName string, options QualityCheckOptions) error {
var args = []string{"scan"}
Expand Down

0 comments on commit fada775

Please sign in to comment.