you can import seatunnel project into IDE by run mvn clean 
package -DskipTests -Dfast, then try to run LocalFlinkExample located on 
seatunnel/seatunnel-examples/seatunnel-flink-examples/ module.


seatunnel-flink-examples provides a demo for run seatunnel job in IDE, 
reproduce you scene, then you can debug freely.




------------------ ???????? ------------------
??????:                                                                         
                                               "dev"                            
                                                        
<[email protected]&gt;;
????????:&nbsp;2022??3??11??(??????) ????0:12
??????:&nbsp;"[email protected]"<[email protected]&gt;;

????:&nbsp;Apache Seatunnel - JDBC Source not showing results in console sink



Hi Folks:
I am trying to write a very simple seatunnel configuration which gets data from 
database (included below - it only has a jdbc source and console sink).&nbsp; 
&nbsp;However, the application terminates without any results.&nbsp; I am using 
Seatunnel 2.0.5-SNAPSHOT for my tests.
I have added the jdbc dependencies as required and have tried to add 
source_table_name in the console sink but still am not able to figure out what 
could be the reason that there are no console results.
If I use the fake source config example - it does work and shows output in the 
console.
Can you please let me know how to debug this and what could the issue ?
Thanks

I am using configuration for Jdbc Source mentioned 
at&nbsp;https://seatunnel.apache.org/docs/flink/configuration/source-plugins/Jdbc
Here is the additional jdbc dependencies for the included config:
&nbsp; &nbsp; &nbsp; &nbsp; <dependency&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; <groupId&gt;org.apache.flink</groupId&gt;&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; 
<artifactId&gt;flink-connector-jdbc_${scala.binary.version}</artifactId&gt;&nbsp;
 &nbsp; &nbsp; &nbsp; </dependency&gt;&nbsp; &nbsp; &nbsp; &nbsp; 
<dependency&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<groupId&gt;mysql</groupId&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<artifactId&gt;mysql-connector-java</artifactId&gt;&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; <version&gt;5.1.49</version&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; <scope&gt;runtime</scope&gt;&nbsp; &nbsp; &nbsp; &nbsp; </dependency&gt;

Here is the configuration seatunnel config (it's based on the fake example 
config&nbsp;https://seatunnel.apache.org/docs/flink/configuration/ConfigExamples/)
env {&nbsp; # You can set flink configuration here&nbsp; execution.parallelism 
= 1&nbsp; #execution.checkpoint.interval = 10000&nbsp; 
#execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"}
source {&nbsp; # This is a example source plugin **only for test and 
demonstrate the feature source plugin**&nbsp; &nbsp; JdbcSource {&nbsp; &nbsp; 
&nbsp; &nbsp; driver = "com.mysql.jdbc.Driver"&nbsp; &nbsp; &nbsp; &nbsp; url = 
"jdbc:mysql://localhost/mydatabase?useSSL=false"&nbsp; &nbsp; &nbsp; &nbsp; 
username = "root"&nbsp; &nbsp; &nbsp; &nbsp; password = ""&nbsp; &nbsp; &nbsp; 
&nbsp; query = "select * from people"&nbsp; &nbsp; &nbsp; &nbsp; 
result_table_name = "people"&nbsp; &nbsp; &nbsp; &nbsp; field_name = 
"name,age,phone"&nbsp; &nbsp; }&nbsp; # If you would like to get more 
information about how to configure seatunnel and see full list of source 
plugins,&nbsp; # please go to 
https://seatunnel.apache.org/docs/flink/configuration/source-plugins/Fake}
transform {##&nbsp; &nbsp;# If you would like to get more information about how 
to configure seatunnel and see full list of transform plugins,#&nbsp; &nbsp;# 
please go to 
https://seatunnel.apache.org/docs/flink/configuration/transform-plugins/Sql}
sink {&nbsp; ConsoleSink {#&nbsp; &nbsp; &nbsp;source_table_name = 
"people"&nbsp; }
&nbsp; # If you would like to get more information about how to configure 
seatunnel and see full list of sink plugins,&nbsp; # please go to 
https://seatunnel.apache.org/docs/flink/configuration/sink-plugins/Console}

Reply via email to