Comments (7)
you can use sql transform and inner query feature.
the query like select id, data.MANTER as new_col ...
from seatunnel.
我的源库和目标库都是MongoDB,也可以使用sql么?
from seatunnel.
from seatunnel.
when you use sql tranfrom.
the field_mapper
will ignore. the transform result will same with you query result.
You can change to console sink to verify the result struct.
And you can use multiple tranfroms to generate the result you wanted,
like
transform {
sql {
query = ""
result_table_name = "sql_res1"
}
sql {
query = ""
source_table_name = "sql_res1"
}
}
from seatunnel.
你好 我按照上面发的写了两个sql标签,执行的时候后台有报错了
024-05-23 15:35:06,093 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:202)
at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: org.apache.seatunnel.engine.common.exception.JobDefineCheckException: The source/transform(MongoDB) is not configured with 'result_table_name' option
at org.apache.seatunnel.engine.core.parse.ConfigParserUtil.checkExistTableId(ConfigParserUtil.java:237)
at org.apache.seatunnel.engine.core.parse.ConfigParserUtil.checkComplexGraph(ConfigParserUtil.java:155)
at org.apache.seatunnel.engine.core.parse.ConfigParserUtil.checkGraph(ConfigParserUtil.java:75)
at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:179)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:88)
at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:156)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:149)
... 2 more
Caused by: org.apache.seatunnel.api.configuration.util.OptionValidationException: ErrorCode:[API-02], ErrorDescription:[Option item validate failed] - The option("result_table_name") is incorrectly configured, please refer to the doc: When result_table_name is not specified, the data processed by this plugin will not be registered as a data set (dataStream/dataset) that can be directly accessed by other plugins, or called a temporary table (table)When result_table_name is specified, the data processed by this plugin will be registered as a data set (dataStream/dataset) that can be directly accessed by other plugins, or called a temporary table (table) . The data set (dataStream/dataset) registered here can be directly accessed by other plugins by specifying source_table_name .
... 9 more
from seatunnel.
from seatunnel.
- the gived config is not complete
it should be ( still ignore som config) :
source {
xxx {
result_table_name = "source_result"
....
}
}
transform {
sql {
query = ""
source_table_name = "source_result"
result_table_name = "sql_res1"
}
sql {
query = ""
source_table_name = "sql_res1"
result_table_name = "sql_res2" // your exception is this config missing parameters
}
}
sink {
xxx {
source_table_name = "sql_res2"
......
}
}
- in your second query, you want query from sink table, this is not right. you can only query from the source table.
data flow is source -> transform -> sink
and also not support query with multiple table using like join
- for your case, your can try (i am not sure it can work, just suggestion)
a.select data.A as data.B from source
b. using json tranform
from seatunnel.
Related Issues (20)
- [Bug] [Zeta] CDC doesn't produce events after checkpoints have finished
- postgreCDC TO hive
- [Bug] [Flink] Flink engine, source is LocalFile, sink is jdbc, get "No suitable driver" Exception HOT 5
- [Bug] [connector-kudu] Wrong kerberos config for kudu connector
- [Feature][Mysql CDC] Support Mysql8.4 To Doris
- [Bug] [mysql-cdc] dump mysql history data to console error:java.lang.UnsatisfiedLinkError and java.lang.Exception are in module java.base of loader 'bootstrap'
- [Bug] Doris data synchronization error HOT 2
- [Feature][Transform-V2 Filter] support exclude columns in the filter transform HOT 2
- [Feature][JDBC-SINK] Insert into a table with auto-increment fields
- Sea Tunnel Issue: Ability to Call Stored Procedure and Move Data to Target with JDBC Source Configuration
- [Feature][Core] The feasibility of seatunnel as an underlying support for an ETL tool(seatunnel作为ETL工具的底层支持的可行性)
- flink on yarn execute fail
- [Bug] [Connector-V2] JDBC-SOURCE: SAP DBTech JDBC: Cannot convert Java type java.math.BigDecimal to SQL type DATE
- 在海豚调度中使用seatunnel采集MySQL数据到ClickHouse问题
- OceanBase CDC Support
- 利用seatunnel 2.3.5 同步aws s3 parquet文件遇到类型不支持问题
- [Feature][influxdb] Support multi-table source feature
- SQLSERVERCDC on flink :If the original table is an update, the target table will generate two pieces of data (one original record and one modified record). The following two sources have been verified and problems have been found in both of them
- [Bug] [Sink] java.net.UnknownHostException HOT 7
- [Feature][V2 connector] LocalFile config option datetime_format support yyyy-MM-dd HH:mm:ss.SSS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seatunnel.