Skip to content

Commit 0e95155

Browse files
committed
fix(scan): remove useless @notempty on configuration
1 parent 3287fb0 commit 0e95155

2 files changed

Lines changed: 30 additions & 29 deletions

File tree

src/main/java/io/kestra/plugin/soda/AbstractSoda.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void setDockerOptions(DockerOptions dockerOptions) {
108108
title = "The configuration file"
109109
)
110110
@NotNull
111-
Property<@NotEmpty Map<String, Object>> configuration;
111+
Property<Map<String, Object>> configuration;
112112

113113
protected Map<String, String> finalInputFiles(RunContext runContext, Path workingDirectory) throws IOException, IllegalVariableEvaluationException {
114114
Map<String, String> map = this.inputFiles != null ? new HashMap<>(PluginUtilsService.transformInputFiles(runContext, this.inputFiles)) : new HashMap<>();

src/main/java/io/kestra/plugin/soda/Scan.java

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import jakarta.validation.constraints.NotEmpty;
2121
import jakarta.validation.constraints.NotNull;
22+
2223
import java.io.IOException;
2324
import java.nio.file.Path;
2425
import java.util.Map;
@@ -38,34 +39,34 @@
3839
title = "Run a scan on BigQuery.",
3940
full = true,
4041
code = """
41-
id: soda_scan
42-
namespacae: company.team
43-
44-
tasks:
45-
- id: scan
46-
type: io.kestra.plugin.soda.Scan
47-
configuration:
48-
data_source kestra:
49-
type: bigquery
50-
connection:
51-
project_id: kestra-unit-test
52-
dataset: demo
53-
account_info_json: |
54-
{{ secret('GCP_CREDS') }}
55-
checks:
56-
checks for orderDetail:
57-
- row_count > 0
58-
- max(unitPrice):
59-
warn: when between 1 and 250
60-
fail: when > 250
61-
checks for territory:
62-
- row_count > 0
63-
- failed rows:
64-
name: Failed rows query test
65-
fail condition: regionId = 4
66-
requirements:
67-
- soda-core-bigquery
68-
"""
42+
id: soda_scan
43+
namespace: company.team
44+
45+
tasks:
46+
- id: scan
47+
type: io.kestra.plugin.soda.Scan
48+
configuration:
49+
data_source kestra:
50+
type: bigquery
51+
connection:
52+
project_id: kestra-unit-test
53+
dataset: demo
54+
account_info_json: |
55+
{{ secret('GCP_CREDS') }}
56+
checks:
57+
checks for orderDetail:
58+
- row_count > 0
59+
- max(unitPrice):
60+
warn: when between 1 and 250
61+
fail: when > 250
62+
checks for territory:
63+
- row_count > 0
64+
- failed rows:
65+
name: Failed rows query test
66+
fail condition: regionId = 4
67+
requirements:
68+
- soda-core-bigquery
69+
"""
6970
)
7071
}
7172
)

0 commit comments

Comments
 (0)