Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc][Connector-V2] add Console sink doc #2822

Merged
merged 3 commits into from
Sep 21, 2022
Merged

Conversation

liugddx
Copy link
Member

@liugddx liugddx commented Sep 20, 2022

Purpose of this pull request

add Console sink doc

Check list

@liugddx
Copy link
Member Author

liugddx commented Sep 20, 2022

#2794

@liugddx liugddx changed the title [Doc][connector] add Console sink doc [Doc][Connector-V2] add Console sink doc Sep 20, 2022
}

transform {
sql = "select name, age from fake"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be

transform {
  sql {
    sql = "select name,age from fake"
  }
}

* Console print data

```text
{"name":"jared","age":17}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@Hisoka-X Hisoka-X linked an issue Sep 21, 2022 that may be closed by this pull request
3 tasks
Copy link
Member

@EricJoy2048 EricJoy2048 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@Hisoka-X Hisoka-X merged commit 32c1c81 into apache:dev Sep 21, 2022
lhyundeadsoul pushed a commit to lhyundeadsoul/incubator-seatunnel that referenced this pull request Sep 21, 2022
* [Doc][connector] add Console sink doc

* [Improve][DOC] A little tinkering

* [Improve][DOC] A little tinkering
@liugddx liugddx deleted the improve-2794 branch October 4, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Doc][Connector-V2] Console Sink Connector have no document
3 participants