| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| ###### |
| ###### This config file is a demonstration of streaming processing in seatunnel config |
| ###### |
| |
| spark { |
| # You can set spark configuration here |
| # seatunnel defined streaming batch duration in seconds |
| spark.streaming.batchDuration = 5 |
| |
| # see available properties defined by spark: https://spark.apache.org/docs/latest/configuration.html#available-properties |
| spark.app.name = "seatunnel" |
| spark.executor.instances = 2 |
| spark.executor.cores = 1 |
| spark.executor.memory = "1g" |
| } |
| |
| input { |
| # This is a example input plugin **only for test and demonstrate the feature input plugin** |
| |
| fake { |
| result_table_name = "my_dataset" |
| } |
| |
| |
| # If you would like to get more information about how to configure seatunnel and see full list of input plugins, |
| # please go to https://interestinglab.github.io/seatunnel-docs/#/zh-cn/v1/configuration/base |
| } |
| |
| filter { |
| split { |
| fields = ["msg", "name"] |
| delimiter = " " |
| result_table_name = "split_table" |
| } |
| |
| # Read data from <split_table> and register table view of <sql_result_table_1> |
| sql { |
| sql = "select * from split_table where name = 'rickyhuo'" |
| result_table_name = "sql_result_table_1" |
| } |
| |
| # Read data from view table <split_table> and register table view of <sql_result_table_2> |
| sql { |
| sql = "select * from split_table where name = 'kid-xiong'" |
| result_table_name = "sql_result_table_2" |
| } |
| |
| |
| |
| # If you would like to get more information about how to configure seatunnel and see full list of filter plugins, |
| # please go to https://interestinglab.github.io/seatunnel-docs/#/zh-cn/v1/configuration/base |
| } |
| |
| output { |
| |
| # If you want to specify which dataset to be output, please specify source_table_name in each output plugin. The value of source_table_name is the same as previous result_table_name. |
| # Also, in default context, you don't need to set source_table_name, the output plugin will output the default dataset. |
| stdout { |
| source_table_name = "split_table" |
| } |
| |
| stdout { |
| source_table_name = "sql_result_table_1" |
| } |
| |
| stdout { |
| source_table_name = "sql_result_table_2" |
| } |
| |
| |
| |
| |
| |
| |
| # If you would like to get more information about how to configure seatunnel and see full list of output plugins, |
| # please go to https://interestinglab.github.io/seatunnel-docs/#/zh-cn/v1/configuration/base |
| } |