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/20 15:14:47 UTC

[GitHub] [incubator-seatunnel] liugddx opened a new pull request, #2822: [Doc][connector] add Console sink doc

liugddx opened a new pull request, #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   add Console sink doc
   ## Check list
   
   * [x] Code changed are covered with tests, or it does not need tests for reason:
   * [x] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #2822: [Doc][Connector-V2] add Console sink doc

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on code in PR #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822#discussion_r975990429


##########
docs/en/connector-v2/sink/Console.md:
##########
@@ -0,0 +1,70 @@
+# Console
+
+> Console sink connector
+
+## Description
+
+Used to send data to Console. Both support streaming and batch mode.
+> For example, if the data from upstream is [`age: 12, name: jared`], the content send to console is the following: `{"name":"jared","age":17}`
+
+## Key features
+
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+
+##  Options
+
+| name | type   | required | default value |
+| --- |--------|----------|---------------|
+## Example
+
+simple:
+
+```hocon
+Console {
+
+    }
+```
+
+test:
+
+* Configuring the SeaTunnel config file
+
+```hocon
+env {
+  execution.parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+    FakeSource {
+      result_table_name = "fake"
+      schema = {
+        fields {
+          name = "string"
+          age = "int"
+        }
+      }
+    }
+}
+
+transform {
+      sql = "select name, age from fake"
+}
+
+sink {
+    Console {
+
+    }
+}
+
+```
+
+* Start a SeaTunnel task
+
+
+* Console print data
+
+```text
+{"name":"jared","age":17}

Review Comment:
   > I'll try
   
   Thank you, you can change `{"name":"jared","age":17}` to 
   
   ```
   row=1 : kTIgqEnmek, 1995767708
   row=2 : XiBgErvEIH, 512006690
   row=3 : XzhptTYBFJ, 1580965094
   ```



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


[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #2822: [Doc][Connector-V2] add Console sink doc

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on code in PR #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822#discussion_r975976799


##########
docs/en/connector-v2/sink/Console.md:
##########
@@ -0,0 +1,70 @@
+# Console
+
+> Console sink connector
+
+## Description
+
+Used to send data to Console. Both support streaming and batch mode.
+> For example, if the data from upstream is [`age: 12, name: jared`], the content send to console is the following: `{"name":"jared","age":17}`
+
+## Key features
+
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+
+##  Options
+
+| name | type   | required | default value |
+| --- |--------|----------|---------------|
+## Example
+
+simple:
+
+```hocon
+Console {
+
+    }
+```
+
+test:
+
+* Configuring the SeaTunnel config file
+
+```hocon
+env {
+  execution.parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+    FakeSource {
+      result_table_name = "fake"
+      schema = {
+        fields {
+          name = "string"
+          age = "int"
+        }
+      }
+    }
+}
+
+transform {
+      sql = "select name, age from fake"

Review Comment:
   should be 
   ```
   transform {
     sql {
       sql = "select name,age from fake"
     }
   }
   
   ```



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


[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #2822: [Doc][Connector-V2] add Console sink doc

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on code in PR #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822#discussion_r975964509


##########
docs/en/connector-v2/sink/Console.md:
##########
@@ -0,0 +1,70 @@
+# Console
+
+> Console sink connector
+
+## Description
+
+Used to send data to Console. Both support streaming and batch mode.
+> For example, if the data from upstream is [`age: 12, name: jared`], the content send to console is the following: `{"name":"jared","age":17}`
+
+## Key features
+
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+
+##  Options
+
+| name | type   | required | default value |
+| --- |--------|----------|---------------|
+## Example
+
+simple:
+
+```hocon
+Console {
+
+    }
+```
+
+test:
+
+* Configuring the SeaTunnel config file
+
+```hocon
+env {
+  execution.parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+    FakeSource {
+      result_table_name = "fake"
+      schema = {
+        fields {
+          name = "string"
+          age = "int"
+        }
+      }
+    }
+}
+
+transform {
+      sql = "select name, age from fake"
+}
+
+sink {
+    Console {
+
+    }
+}
+
+```
+
+* Start a SeaTunnel task
+
+
+* Console print data
+
+```text
+{"name":"jared","age":17}

Review Comment:
   I delete the `sql = "select name, age from fake"` and test again, the result data format is 
   
   ```
   fields : name, age
   types : STRING, INT
   row=1 : kTIgqEnmek, 1995767708
   row=2 : XiBgErvEIH, 512006690
   row=3 : XzhptTYBFJ, 1580965094
   row=4 : TaPODkPfbr, 906352196
   row=5 : RikifKdMYV, 1160742148
   row=6 : dYiyuLirga, 267550983
   row=7 : gnuOXNQOSb, 1343626802
   row=8 : UHlkfrpBLZ, 1382683507
   row=9 : rEwNHxFpsT, 318461297
   row=10 : SpbedVNWhn, 1569444335
   row=11 : lZFPAUIUfD, 604436234
   row=12 : hCqsxYwsZD, 927394063
   row=13 : ICMhzlNAvR, 215012519
   row=14 : vpAuOWSzHU, 358369980
   row=15 : fxuMpUpGUA, 477071172
   row=16 : fnZapRDDcU, 767283150
   row=17 : MHbLMHEyAp, 165111884
   row=18 : ImBiQdRuAa, 1122842860
   row=19 : toRrexyiTx, 1383579467
   row=20 : kkJfUmGgCN, 1904226574
   row=21 : DyNDkMWrdC, 18456794
   row=22 : kRMJMYmNmW, 1314673824
   row=23 : ffLWtlKbep, 1422679907
   row=24 : EUfjFHkYnj, 1100063222
   row=25 : ZwUhKrgBpc, 885374895
   row=26 : JGeJvSyDZX, 333513288
   row=27 : kVqfneFuUe, 1494395147
   row=28 : kmefehwNxd, 1647081002
   ```



##########
docs/en/connector-v2/sink/Console.md:
##########
@@ -0,0 +1,70 @@
+# Console
+
+> Console sink connector
+
+## Description
+
+Used to send data to Console. Both support streaming and batch mode.
+> For example, if the data from upstream is [`age: 12, name: jared`], the content send to console is the following: `{"name":"jared","age":17}`
+
+## Key features
+
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+
+##  Options
+
+| name | type   | required | default value |
+| --- |--------|----------|---------------|
+## Example
+
+simple:
+
+```hocon
+Console {
+
+    }
+```
+
+test:
+
+* Configuring the SeaTunnel config file
+
+```hocon
+env {
+  execution.parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+    FakeSource {
+      result_table_name = "fake"
+      schema = {
+        fields {
+          name = "string"
+          age = "int"
+        }
+      }
+    }
+}
+
+transform {
+      sql = "select name, age from fake"

Review Comment:
   Do you test this example config? I test it on spark and found error. I am not sure if this is a bug. @ashulin  @Hisoka-X  
   
   This is the error logs:
   
   ```
   22/09/21 09:50:48 ERROR command.SparkApiTaskExecuteCommand: Run SeaTunnel on spark failed.
   org.apache.seatunnel.shade.com.typesafe.config.ConfigException$WrongType: ../config/flink_fake_console.conf: 17: transform has type list of STRING rather than list of OBJECT
           at org.apache.seatunnel.shade.com.typesafe.config.impl.SimpleConfig.getHomogeneousWrappedList(SimpleConfig.java:452)
           at org.apache.seatunnel.shade.com.typesafe.config.impl.SimpleConfig.getObjectList(SimpleConfig.java:460)
           at org.apache.seatunnel.shade.com.typesafe.config.impl.SimpleConfig.getConfigList(SimpleConfig.java:465)
           at org.apache.seatunnel.core.starter.spark.execution.SparkExecution.<init>(SparkExecution.java:49)
           at org.apache.seatunnel.core.starter.spark.command.SparkApiTaskExecuteCommand.execute(SparkApiTaskExecuteCommand.java:53)
           at org.apache.seatunnel.core.starter.Seatunnel.run(Seatunnel.java:40)
           at org.apache.seatunnel.core.starter.spark.SeatunnelSpark.main(SeatunnelSpark.java:34)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52)
           at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:849)
           at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:167)
           at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:195)
           at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
           at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:924)
           at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:933)
           at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
   ```



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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #2822: [Doc][Connector-V2] add Console sink doc

Posted by GitBox <gi...@apache.org>.
liugddx commented on code in PR #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822#discussion_r975992124


##########
docs/en/connector-v2/sink/Console.md:
##########
@@ -0,0 +1,70 @@
+# Console
+
+> Console sink connector
+
+## Description
+
+Used to send data to Console. Both support streaming and batch mode.
+> For example, if the data from upstream is [`age: 12, name: jared`], the content send to console is the following: `{"name":"jared","age":17}`
+
+## Key features
+
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+
+##  Options
+
+| name | type   | required | default value |
+| --- |--------|----------|---------------|
+## Example
+
+simple:
+
+```hocon
+Console {
+
+    }
+```
+
+test:
+
+* Configuring the SeaTunnel config file
+
+```hocon
+env {
+  execution.parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+    FakeSource {
+      result_table_name = "fake"
+      schema = {
+        fields {
+          name = "string"
+          age = "int"
+        }
+      }
+    }
+}
+
+transform {
+      sql = "select name, age from fake"
+}
+
+sink {
+    Console {
+
+    }
+}
+
+```
+
+* Start a SeaTunnel task
+
+
+* Console print data
+
+```text
+{"name":"jared","age":17}

Review Comment:
   Fixed



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


[GitHub] [incubator-seatunnel] liugddx commented on pull request #2822: [Doc][connector] add Console sink doc

Posted by GitBox <gi...@apache.org>.
liugddx commented on PR #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822#issuecomment-1252514576

   #2794 


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


[GitHub] [incubator-seatunnel] liugddx commented on a diff in pull request #2822: [Doc][Connector-V2] add Console sink doc

Posted by GitBox <gi...@apache.org>.
liugddx commented on code in PR #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822#discussion_r975976393


##########
docs/en/connector-v2/sink/Console.md:
##########
@@ -0,0 +1,70 @@
+# Console
+
+> Console sink connector
+
+## Description
+
+Used to send data to Console. Both support streaming and batch mode.
+> For example, if the data from upstream is [`age: 12, name: jared`], the content send to console is the following: `{"name":"jared","age":17}`
+
+## Key features
+
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+
+##  Options
+
+| name | type   | required | default value |
+| --- |--------|----------|---------------|
+## Example
+
+simple:
+
+```hocon
+Console {
+
+    }
+```
+
+test:
+
+* Configuring the SeaTunnel config file
+
+```hocon
+env {
+  execution.parallelism = 1
+  job.mode = "STREAMING"
+}
+
+source {
+    FakeSource {
+      result_table_name = "fake"
+      schema = {
+        fields {
+          name = "string"
+          age = "int"
+        }
+      }
+    }
+}
+
+transform {
+      sql = "select name, age from fake"
+}
+
+sink {
+    Console {
+
+    }
+}
+
+```
+
+* Start a SeaTunnel task
+
+
+* Console print data
+
+```text
+{"name":"jared","age":17}

Review Comment:
   I'll try



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


[GitHub] [incubator-seatunnel] Hisoka-X merged pull request #2822: [Doc][Connector-V2] add Console sink doc

Posted by GitBox <gi...@apache.org>.
Hisoka-X merged PR #2822:
URL: https://github.com/apache/incubator-seatunnel/pull/2822


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