阿里云首页

QuickBI数据集预览报错:null : INTERNAL: java.sql.SQLException: java.util.concurrent.ExecutionException

问题描述

QuickBI数据集预览报错:

null: INTERNAL: java.sql.SQLException: java.util.concurrent.ExecutionException: java.sql.SQLException: execute sql [SELECT ALI_T_1_.`category_name` AS T_A1D_2_, ALI_T_1_.`sku_real_price` - ALI_T_1_.`cost_price` AS T_A19_3_, ALI_T_1_.`sku_sales_price` AS T_ADA_4_, ALI_T_1_.`sku_margin_rate` AS T_A48_5_, ALI_T_1_.`shop_no` AS T_A9A_6_, ALI_T_1_.`sku_real_price` AS T_AFC_7_, TO_CHAR(ALI_T_1_.`created_datetime`, 'yyyy') AS T_A72_8_, CONCAT(TO_CHAR(ALI_T_1_.`created_datetime`, 'yyyy'), 'Q', CEIL(TO_CHAR(ALI_T_1_.`created_datetime`,'mm')/3)) AS T_A18_9_, TO_CHAR(ALI_T_1_.`created_datetime`, 'yyyyMM') AS T_A73_10_, CONCAT(CASE WHEN datepart(ALI_T_1_.`created_datetime`, 'mm') =1 AND WEEKOFYEAR(ALI_T_1_.`created_datetime`) > 50 THEN datepart(dateadd(ALI_T_1_.`created_datetime`,-1,'yyyy'), 'yyyy') WHEN datepart(ALI_T_1_.`created_datetime`, 'mm') =12 AND WEEKOFYEAR(ALI_T_1_.`created_datetime`) = 1 THEN datepart(dateadd(ALI_T_1_.`created_datetime`,1,'yyyy'), 'yyyy') ELSE datepart(ALI_T_1_.`created_datetime` , 'yyyy') END,'-',CASE WHEN WEEKOFYEAR(ALI_T_1_.`created_datetime`) < 10 THEN CONCAT('0',WEEKOFYEAR(ALI_T_1_.`created_datetime`)) ELSE WEEKOFYEAR(ALI_T_1_.`created_datetime`) END) AS T_AA6_11_, TO_CHAR(ALI_T_1_.`created_datetime`, 'yyyyMMdd') AS T_AD0_12_, TO_CHAR(ALI_T_1_.`created_datetime`, 'hh:00:00') AS T_A9B_13_, TO_CHAR(ALI_T_1_.`created_datetime`, 'hh:mi:00') AS T_AFA_14_, TO_CHAR(ALI_T_1_.`created_datetime`, 'hh:mi:ss') AS T_A21_15_, TO_CHAR(ALI_T_1_.`created_datetime`, 'yyyyMMdd hh:mi:ss') AS T_AC8_16_, ALI_T_1_.`team_name` AS T_A11_17_, ALI_T_1_.`department_name` AS T_A25_18_, ALI_T_1_.`sku_code` AS T_ACD_19_, ALI_T_1_.`quantity` AS T_A19_20_, TO_CHAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'), 'yyyy') AS T_A41_21_, CONCAT(TO_CHAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'), 'yyyy'), 'Q', CEIL(TO_CHAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'),'mm')/3)) AS T_AA4_22_, TO_CHAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'), 'yyyyMM') AS T_A10_23_, CONCAT(CASE WHEN datepart(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'), 'mm') =1 AND WEEKOFYEAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd')) > 50 THEN datepart(dateadd(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'),-1,'yyyy'), 'yyyy') WHEN datepart(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'), 'mm') =12 AND WEEKOFYEAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd')) = 1 THEN datepart(dateadd(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'),1,'yyyy'), 'yyyy') ELSE datepart(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd') , 'yyyy') END,'-',CASE WHEN WEEKOFYEAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd')) < 10 THEN CONCAT('0',WEEKOFYEAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'))) ELSE WEEKOFYEAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd')) END) AS T_AFB_24_, TO_CHAR(TO_DATE(ALI_T_1_.`ds`, 'yyyyMMdd'), 'yyyyMMdd') AS T_A7B_25_, ALI_T_1_.`sku_all_price` AS T_AD4_26_, ALI_T_1_.`cost_price` AS T_A6F_27_, ALI_T_1_.`shop_addr_province` AS T_A91_28_, ALI_T_1_.`shop_name` AS T_AE8_29_, ALI_T_1_.`first_channel_name` AS T_A71_30_, ALI_T_1_.`shop_addr_city` AS T_A66_31_, ALI_T_1_.`sku_name` AS T_ACB_32_, ALI_T_1_.`snt_order_no` AS T_AF8_33_ FROM `snt_union_store_1`.`ads_quickbi_fct_offline_smallshop_tob_sale_order_detail` ALI_T_1_ WHERE TO_CHAR(ALI_T_1_.`created_datetime`, 'yyyyMMdd') = '20211104' LIMIT 200;] instance :[20211105032742169ghx3eqsa] failed: ODPS -0130071 :[0,0] Semantic analysis exception - physical plan generation failed: java.lang.RuntimeException: Table(

snt_union_store_1,

ads_quickbi_fct_offline_smallshop_tob_sale_order_detail

) is full scan with all partitions,

please specify partition predicates.

问题原因

表(snt_union_store_1,ads_quickbi_fct_offline_smallshop_tob_sale_order_detail)是全扫描与所有分区,需要指定分区。

解决方案

在创建数据集的SQL里加入指定分区的语句:where ds=“查看的日期”,即可正常预览数据集数据。

适用于

  • Quick BI
首页 QuickBI数据集预览报错:null : INTERNAL: java.sql.SQLException: java.util.concurrent.ExecutionException