NoPr commented on issue #7058:
URL: https://github.com/apache/seatunnel/issues/7058#issuecomment-2222602168

   > The config should be:
   > 
   > ```hocon
   > transform {
   >    Sql {
   >            source_table_name = "assignments"
   >            result_table_name = "mongoassignments"
   >            query = "select CAST(W6KEY as INT) as w6key, 
CAST(IFNULL(TASK,0),INT) as task from w6assignments"
   >    }
   > }
   > ```
   > 
   > use `cast (name as int)` not `cast(name,int)`
   
   
   
   > > 你好,我有一个问题:
   > > "query " : "select col1 from fake_1810212286042378240_fa where col1 > 
2023-12-16T10:58:24.844'" 
   > > "query " : "select col1 from fake_1810212286042378240_fa where cast(col1 
as integer) > 1720690455" 
   > > "query " : "select cast(col1 as integer) as col1 from 
fake_1810212286042378240_fa where col1 > 1720690455"
   > > 或者
   > > "query " : "select col1 from fake_1810212286042378240_fa where col1 > 
cast('2023-12-16T10:58:24.844' as localdaetime)"我并不能找出增量数据。
   > > 
前三者会报错左右字段不匹配,后者会报错不能转换。而且增量查询只能在transform使用中?请问我的查询语句在哪里有问题,谢谢你。col1是timestamp字段类型,
   > 
   > 看起来像是一个错误,你能为此创建一个问题吗?谢谢。
   
   [你好,这是我创建的issues](https://github.com/apache/seatunnel/issues/7172)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to