Sql
Filter plugin : Sqlâ
- Author: InterestingLab
- Homepage: https://interestinglab.github.io/seatunnel-docs
- Version: 1.0.0
Descriptionâ
Processing Rows using SQL, feel free to use Spark UDF.
Optionsâ
name | type | required | default value |
---|---|---|---|
sql | string | yes | - |
table_name | string | yes | - |
sql [string]â
SQL content.
table_name [string]â
When table
set, the current batch of events will be registered as a table, named by this table
setting, on which you can execute sql.
Examplesâ
sql {
sql = "select username, address from user_info",
table_name = "user_info"
}
Select the
username
andaddress
fields, the remaining fields will be removed.
sql {
sql = "select substring(telephone, 0, 10) from user_info",
table_name = "user_info"
}
Use the substring function to retrieve a substring on the
telephone
field.
sql {
sql = "select avg(age) from user_info",
table_name = "user_info"
}
Get the aggregation of the average of
age
using the avg functions.