报错信息
org.apache.flink.table.api.TableException: Temporal table join requires an equality condition on fields of table *******************
发生地址
flinksql 与维表关联场景 包括hive的流式join
解决
关联条件必须等值关联 也就是必须是等号,并且 关联条件两边要确定数据类型相同
实测
如果关联条件都是字符串,内容是数字,两测都强制类型转换,cast(feild as bigint) 会报错。很奇怪 做了强制类型转换反而报错了
不支持 已经是int的类型 再次cast(int类型字段 as int) 与 cast(string类型字段 as int) 做关联 必须 string类型字段 = cast(int类型字段 as string) 这么做
报错!!!!
left join hive_zjyprc_hadoop.china_bi.dim_sku_great_bargains /*+ OPTIONS('streaming-source.enable' = 'true','streaming-source.partition.include' = 'latest',
'streaming-source.partition-order' = 'create-time','streaming-source.monitor-interval' = '1 h') */
FOR SYSTEM_TIME AS OF w.proctime AS w3 on cast(w.category_id as bigint) = cast(w3.virtual_category_id as bigint)
正确!!! left join hive_zjyprc_hadoop.china_bi.dim_sku_great_bargains /*+ OPTIONS('streaming-source.enable' = 'true','streaming-source.partition.include' = 'latest',
'streaming-source.partition-order' = 'create-time','streaming-source.monitor-interval' = '1 h') */
FOR SYSTEM_TIME AS OF w.proctime AS w3 on w.category_id = cast(w3.virtual_category_id
8114



被折叠的 条评论
为什么被折叠?



