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/06/27 11:56:41 UTC

[GitHub] [incubator-seatunnel] Interest1-wyt commented on a diff in pull request #1958: [Feature][transform] Add a module to set default value for null field

Interest1-wyt commented on code in PR #1958:
URL: https://github.com/apache/incubator-seatunnel/pull/1958#discussion_r907302004


##########
docs/en/transform/nulltf.md:
##########
@@ -0,0 +1,67 @@
+# Nulltf
+
+## Description
+
+set default value for null field
+
+:::tip
+
+This transform only supported by engine Spark.
+
+:::
+
+## Options
+
+| name                | type    | required | default value |
+| ------------------- | ------- | -------- | ------------- |
+| fields              | array   | no       | -             |
+
+### fields [list]
+
+A list of fields whose default value will be set. 
+The default value of the field can be set in the form of "=value" after the field name. 
+If there is no "=value" after the field name, the default value will be set according to the field type.
+
+## Examples
+
+the configuration
+
+```bash
+  nulltf {
+      fields = ["name","price=0","num=100","flag","dt_timestamp=2022-05-18 13:51:40.603","dt_date=2022-05-19"]
+  }

Review Comment:
   Yes, I will resubmit later.
   Thanks for your suggestion :) 



-- 
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