SqlExceptionHelper:具有聚集列存储索引的 table 不支持游标
SqlExceptionHelper: Cursors are not supported on a table which has a clustered columnstore index
我正在尝试将数据从使用聚集列存储索引的 DWH SQL 服务器 table 导入 kudu
到 flume
。但是,在我的自定义 flume
源从数据库中检索到一定数量的行后,会出现此异常:
SqlExceptionHelper: Cursors are not supported on a table which has a clustered columnstore index
我正在使用 JDBC SQL 服务器驱动程序类型 4,显然它使用游标来迭代结果集。因此,我尝试将提取大小设置为查询限制的数量,但没有任何改变。
如何阻止 JDBC 驱动程序使用游标,从而将所有行导入 kudu
table?
提前致谢。
尝试在连接属性中设置 selectmethod=direct
。 Source:
If set to direct (the default), the database server sends the complete result set in a single response to the driver when responding to a query. A server-side database cursor is not created if the requested result set type is a forward-only result set. Typically, responses are not cached by the driver. Using this method, the driver must process the entire response to a query before another query is submitted. If another query is submitted (using a different statement on the same connection, for example), the driver caches the response to the first query before submitting the second query. Typically, the Direct method performs better than the Cursor method.
当然,您需要将结果集定义为 FORWARD_ONLY 以保证这一点。
我正在尝试将数据从使用聚集列存储索引的 DWH SQL 服务器 table 导入 kudu
到 flume
。但是,在我的自定义 flume
源从数据库中检索到一定数量的行后,会出现此异常:
SqlExceptionHelper: Cursors are not supported on a table which has a clustered columnstore index
我正在使用 JDBC SQL 服务器驱动程序类型 4,显然它使用游标来迭代结果集。因此,我尝试将提取大小设置为查询限制的数量,但没有任何改变。
如何阻止 JDBC 驱动程序使用游标,从而将所有行导入 kudu
table?
提前致谢。
尝试在连接属性中设置 selectmethod=direct
。 Source:
If set to direct (the default), the database server sends the complete result set in a single response to the driver when responding to a query. A server-side database cursor is not created if the requested result set type is a forward-only result set. Typically, responses are not cached by the driver. Using this method, the driver must process the entire response to a query before another query is submitted. If another query is submitted (using a different statement on the same connection, for example), the driver caches the response to the first query before submitting the second query. Typically, the Direct method performs better than the Cursor method.
当然,您需要将结果集定义为 FORWARD_ONLY 以保证这一点。