Dataphin即席查询执行报错:"Failed to parse cav, message: Maximum column length of 100,000 exceeded in column 16 in record 4,243"

更新时间:

问题描述

Dataphin即席查询执行报错:"Failed to parse cav, message: Maximum column length of 100,000 exceeded in column 16 in record 4,243"。

2022-09-29 10:25:24.490 FAILED: OsBizException: Failed to parse cav, message: Maximum column length of 100,000 exceeded in column 16 in record 4,243. Set the SafetySwitch property to false if you're expecting column lengths greater than 100,000 characters to avoid this error., cause: [null] 
com.alibaba.dt.oneservice.api.exception.OsBizException: Failed to parse cav, message: Maximum column length of 100,000 exceeded in column 16 in record 4,243. Set the SafetySwitch property to false if you're expecting column lengths greater than 100,000 characters to avoid this error., cause: [null]
 at com.alibaba.dt.oneservice.sdk.utils.QueryResultUtils.parseOdpsResultAsCsv(QueryResultUtils.java:99)
 at com.alibaba.dt.oneservice.sdk.utils.QueryResultUtils.parseOdpsResults(QueryResultUtils.java:39)
 at com.alibaba.dt.oneservice.sdk.OdpsSqlExecutor.getExecuteResults(OdpsSqlExecutor.java:280)
 at com.alibaba.dt.oneservice.sdk.OdpsTask.getTaskResults(OdpsTask.java:334)
 at com.alibaba.dt.oneservice.sdk.BaseOsInstance.getTaskResults(BaseOsInstance.java:434)
 at com.alibaba.dt.voldemort.contrib.operator.oneservice.OneServiceSqlOperator.execute(OneServiceSqlOperator.java:79)
 at com.alibaba.dt.voldemort.contrib.operator.base.BaseOperator.call(BaseOperator.java:354)
 at com.alibaba.dt.voldemort.contrib.operator.base.BaseOperator.call(BaseOperator.java:120)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
 at java.lang.Thread.run(Thread.java:882)

问题原因

查询结果太长,超过100000字符导致的。

解决方案

执行SQL时做limit条数限制或者字段限制。

适用于

  • Dataphin 公共云