From fada775bb56541182fe5a29428dbfbf55ba542f6 Mon Sep 17 00:00:00 2001 From: Stefan Negele Date: Fri, 17 Nov 2023 14:45:22 +0100 Subject: [PATCH] Add documentation for test command --- README.md | 19 +++++++++++++------ cmd/datacontract.go | 10 +++++----- quality.go | 2 +- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7a8879cc..3f1d6a0f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/cmd/datacontract.go b/cmd/datacontract.go index c5471117..f89535e2 100644 --- a/cmd/datacontract.go +++ b/cmd/datacontract.go @@ -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{ @@ -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 { @@ -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, @@ -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, diff --git a/quality.go b/quality.go index 4e74369e..27ae9c75 100644 --- a/quality.go +++ b/quality.go @@ -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"}