Skip to content

Commit

Permalink
[Bug][E2E] Fix E2E assert rules style (#3031)
Browse files Browse the repository at this point in the history
  • Loading branch information
hailin0 authored Oct 9, 2022
1 parent 5f098a0 commit 590b478
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 39 deletions.
4 changes: 2 additions & 2 deletions docs/en/connector-v2/sink/Assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A flink sink plugin which can assert illegal data by user defined rules

| name | type | required | default value |
| ------------------------------------------- | ---------- | -------- | ------------- |
|rules | ConfigList | yes | - |
|rules | ConfigMap | yes | - |
|rules.field_rules | string | yes | - |
|rules.field_rules.field_name | string | yes | - |
|rules.field_rules.field_type | string | no | - |
Expand All @@ -27,7 +27,7 @@ A flink sink plugin which can assert illegal data by user defined rules
|rules.row_rules.rule_value | string | no | - |
| common-options | | no | - |

### rules [ConfigList]
### rules [ConfigMap]

Rule definition of user's available data. Each rule represents one field validation or row num validation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,27 @@ sink {
}

Assert {
rules =
[{
field_name = c_string
field_type = string
field_value = [
{
rule_type = NOT_NULL
}
]
}, {
field_name = c_boolean
field_type = boolean
field_value = [
{
rule_type = NOT_NULL
}
]
}
rules = {
field_rules = [
{
field_name = c_string
field_type = string
field_value = [
{
rule_type = NOT_NULL
}
]
}, {
field_name = c_boolean
field_type = boolean
field_value = [
{
rule_type = NOT_NULL
}
]
}
]
}
}
# If you would like to get more information about how to configure seatunnel and see full list of sink plugins,
# please go to https://seatunnel.apache.org/docs/connector-v2/sink/File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,26 @@ sink {
Console {
}
Assert {
rules = [
{
field_name = f1
field_type = long
field_value = [
{
rule_type = NOT_NULL
},
{
rule_type = MIN
rule_value = 0
},
{
rule_type = MAX
rule_value = 99
}
]
}
]
rules = {
field_rules = [
{
field_name = f1
field_type = long
field_value = [
{
rule_type = NOT_NULL
},
{
rule_type = MIN
rule_value = 0
},
{
rule_type = MAX
rule_value = 99
}
]
}
]
}
}
}

0 comments on commit 590b478

Please sign in to comment.