flink sql jdbc 只要含有group by 语句就会报错No operations allowed after statement closed.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

flink sql jdbc 只要含有group by 语句就会报错No operations allowed after statement closed.

shao.hongxiao
报错sql
正常执行sql

这是为什么呀,好奇怪
Reply | Threaded
Open this post in threaded view
|

Re: flink sql jdbc 只要含有group by 语句就会报错No operations allowed after statement closed.

Rui Li
Hi,看不到你贴的SQL,试试直接发一下文字呢?

On Thu, May 21, 2020 at 11:25 AM shao.hongxiao <[hidden email]> wrote:


--
Best regards!
Rui Li
Reply | Threaded
Open this post in threaded view
|

回复: flink sql jdbc 只要含有group by 语句就会报错No operations allowed after statement closed.

shao.hongxiao
|INSERT INTO pvuv_sink
|SELECT
| user_id,item_id,category_id,count(1) as cnt
|FROM user_log
|group by user_id,item_id,category_id
以上是报错得sql
11:21:57,157 ERROR org.apache.flink.api.java.io.jdbc.JDBCUpsertOutputFormat      - JDBC executeBatch error, retry times = 1
java.sql.SQLException: No operations allowed after statement closed.


正常sql,可以插入mysql
|INSERT INTO pvuv_sink
|SELECT
| user_id,item_id,category_id,1
|FROM user_log

| |
邵红晓
|
|
邮箱:[hidden email]
|
签名由网易邮箱大师定制
在2020年5月21日 11:39,Rui Li<[hidden email]> 写道:
Hi,看不到你贴的SQL,试试直接发一下文字呢?

On Thu, May 21, 2020 at 11:25 AM shao.hongxiao <[hidden email]> wrote:

报错sql
正常执行sql

这是为什么呀,好奇怪
邵红晓
邮箱:[hidden email]

<https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=%E9%82%B5%E7%BA%A2%E6%99%93&uid=17611022895%40163.com&iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2Fde509f973023059c028c85e411fc61eb.jpg&items=%5B%22%22%2C%22%E9%82%AE%E7%AE%B1%EF%BC%9A17611022895%40163.com%22%2C%22%22%2C%22%22%2C%22%22%5D>
签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制



--
Best regards!
Rui Li
Reply | Threaded
Open this post in threaded view
|

Re: flink sql jdbc 只要含有group by 语句就会报错No operations allowed after statement closed.

Rui Li
看异常感觉是连接超时导致的,有一个相关的jira,https://issues.apache.org/jira/browse/FLINK-16681

On Thu, May 21, 2020 at 11:41 AM shao.hongxiao <[hidden email]> wrote:

> |INSERT INTO pvuv_sink
> |SELECT
> | user_id,item_id,category_id,count(1) as cnt
> |FROM user_log
> |group by user_id,item_id,category_id
> 以上是报错得sql
> 11:21:57,157 ERROR org.apache.flink.api.java.io.jdbc.JDBCUpsertOutputFormat
>     - JDBC executeBatch error, retry times = 1
> java.sql.SQLException: No operations allowed after statement closed.
>
>
> 正常sql,可以插入mysql
> |INSERT INTO pvuv_sink
> |SELECT
> | user_id,item_id,category_id,1
> |FROM user_log
>
> | |
> 邵红晓
> |
> |
> 邮箱:[hidden email]
> |
> 签名由网易邮箱大师定制
> 在2020年5月21日 11:39,Rui Li<[hidden email]> 写道:
> Hi,看不到你贴的SQL,试试直接发一下文字呢?
>
> On Thu, May 21, 2020 at 11:25 AM shao.hongxiao <[hidden email]>
> wrote:
>
> 报错sql
> 正常执行sql
>
> 这是为什么呀,好奇怪
> 邵红晓
> 邮箱:[hidden email]
>
> <
> https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=%E9%82%B5%E7%BA%A2%E6%99%93&uid=17611022895%40163.com&iconUrl=http%3A%2F%2Fmail-online.nosdn.127.net%2Fde509f973023059c028c85e411fc61eb.jpg&items=%5B%22%22%2C%22%E9%82%AE%E7%AE%B1%EF%BC%9A17611022895%40163.com%22%2C%22%22%2C%22%22%2C%22%22%5D
> >
> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制
>
>
>
> --
> Best regards!
> Rui Li
>


--
Best regards!
Rui Li