1、<> 不能和NULL 比较,返回 NULL
2、flink 一任务要从版本 1.12 升级 到 1.13,报错 :Caused by: java.lang.NoSuchMethodError: org.apache.flink.table.factories.DynamicTableFactory$Context.getCatalogTable()Lorg/apache/flink/table/catalog/CatalogTable;
参考链接,可看到 Flink计算引擎为VVR 4.0及以上版本的Hologres Flink Connector支持非主键的维表JOIN,而VVR 4.0以下版本的Hologres Flink Connector仅支持主键的维表JOIN。
flink 1.13 对应的就是 VVR 4.0 以上,所以可以不用之前 flink 1.12 使用的调整过的 JDBC(把jdbc connector和postgres jdbc的jar包封装在一起,因为hologres兼容postgres,通过postgres jdbc查询,对关联键没有必须是主键的要求)
因此,表参数由
WITH (
'connector' = 'jdbc', -- 该自定义connector仅仅是jdbc connector结合postgres jdbc的打包
'url' = '...',
'driver'='org.postgresql.Driver',
'table-name' = '...',
'username' = '...',
'password' = '...'
);
更新为了
CREATE TABLE hologres_dim(
id INT,
len INT,
content VARCHAR
) with (
'connector'='hologres',
'dbname'='<yourDbname>',
'tablename'='<yourTablename>',
'username'='<yourUsername>',
'password'='<yourPassword>',
'endpoint'='<yourEndpoint>'
);
3、“java8约等于JDK8,而Java8和Java1.8同样是一种东西
4、Hive同步到holo报错:Caused by: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 1.0 failed 4 times, most recent failure: Lost task 0.3 in stage 1.0 (TID 4, emr-worker-16.cluster-111290, executor 4): java.lang.NullPointerException
查找之前的笔记发现记录过,字段名不一致的情况会报这种错误,检查字段发现是这个问题。