You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/30 07:45:11 UTC

[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #2844: [Feature][Connector-v2] improve assert sink connector

liugddx commented on code in PR #2844:
URL: https://github.com/apache/incubator-seatunnel/pull/2844#discussion_r984306453


##########
docs/en/connector-v2/sink/Assert.md:
##########
@@ -47,53 +54,66 @@ The following rules are supported for now
 - MAX `define the maximum value of data`
 - MIN_LENGTH `define the minimum string length of a string data`
 - MAX_LENGTH `define the maximum string length of a string data`
+- MIN_ROW `define the minimun number of rows`
+- MAX_ROW `define the maximum number of rows`
 
 ### rule_value [double]
 
 the value related to rule type
 
-
 ## Example
 the whole config obey with `hocon` style
 
 ```hocon
 Assert {
-    rules = 
-        [{
-            field_name = name
-            field_type = string
-            field_value = [
-                {
-                    rule_type = NOT_NULL
-                },
-                {
-                    rule_type = MIN_LENGTH
-                    rule_value = 3
-                },
-                {
-                     rule_type = MAX_LENGTH
-                     rule_value = 5
-                }
-            ]
-        },{
-            field_name = age
-            field_type = int
-            field_value = [
-                {
-                    rule_type = NOT_NULL
-                },
-                {
-                    rule_type = MIN
-                    rule_value = 10
-                },
-                {
-                     rule_type = MAX
-                     rule_value = 20
-                }
-            ]
+    rules =
+      {
+        row_rules = [
+          {
+            rule_type = MAX_ROW

Review Comment:
   > If I want to test test final row number equals a expected value, how can I do.
   
   add `EQUAL_ROW` rule_type? any good suggestions?
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org