{"traceId":"de31655e-3180-4194-9432-9773658b8d0c","code":"AE0510100008","message":"SQL导入出错","success":false,"queryErrMsg":null,"exStack":"com.alibaba.yunbi.v2.common.util.exception.AppRuntimeException: AE0510100008:SQL import error ${0}${1}\n\tcom.alibaba.yunbi.v2.datacube.service.customizesql.AbstractCustomizeSqlImpl.createOrUpdateCustomizeSQL(AbstractCustomizeSqlImpl.java:372)\n\tcom.alibaba.yunbi.v2.datacube.service.newcube.CubeServiceImpl.saveSchema(CubeServiceImpl.java:580)\n\tcom.alibaba.yunbi.v2.datacube.service.newcube.CubeServiceImpl.saveSchema(CubeServiceImpl.java:607)\n......\norg.springframework.dao.DataIntegrityViolationException: \n### Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sql_text' at row 1\n### The error may involve com.alibaba.yunbi.v2.common.dal.mapper.sql.CustomizeSQLMapper.insert-Inline\n### The error occurred while setting parameters\n### SQL: INSERT INTO yunbi_customize_sql(sql_id, caption, sql_text, logic_table_name, ds_id, cube_id,ds_type, creator, modifier, workspace_id, gmt_create, gmt_modified) VALUES(?,?,?,?,?,?, ?,?,?,?, now(), now())\n### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sql_text' at row 1\n; SQL []; Data truncation: Data too long for column 'sql_text' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sql_text' at row 1\n\torg.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:102)\n\torg.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)\n\torg.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)\n......\n","data":null}
Quick BI中ClickHouse数据源使用SQL可以执行成功但是创建数据集无法保存,报错“Data too long for column 'sql_text'”
问题描述
Quick BI中ClickHouse数据源使用SQL可以执行成功但是创建数据集无法保存,报错“Data too long for column 'sql_text'”。
报错日志如下:
问题原因
自定义SQL太长导致无法保存,长度是由yunbi_customize_sql这个表的sql_text字段设置。
解决方案
优化自定义SQL,减少SQL长度。
适用于
- Quick BI