使用 jdbc 连接器将 flink DataStream 连接到带有覆盖的 mysql 接收器

问题描述

我的用例是

  1. 使用 flink 数据流 api 从 AWS Kinesis 数据流中获取数据并过滤/映射
  2. 使用 StreamTable 环境对数据进行分组和聚合
  3. 使用 sqlTableEnvironment 使用 JDBC 连接器写入 MysqL

我能够将我的数据流结果写入 MysqL 表,但由于流式传输它附加每个新行,而我想覆盖。

function sayHello() {
    return {
        name: 'mike'
    }
};
function* test() {
    yield(sayHello);
}

const a = test();
const v = a.next().value;

// We need to ensure that this v is not void,// which leaves it being the function
if(v){
  const r = v().name;
  console.log(r) // works!
}

// Now that it has yielded,this would be undefined
console.log(a.next().value)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)