当前位置: 首页 > news >正文

南昌做网站哪家公司比较好交换链接适合哪些网站

南昌做网站哪家公司比较好,交换链接适合哪些网站,wordpress支付宝扫码,个人网站效果图咋做博主历时三年精心创作的《大数据平台架构与原型实现:数据中台建设实战》一书现已由知名IT图书品牌电子工业出版社博文视点出版发行,点击《重磅推荐:建大数据平台太难了!给我发个工程原型吧!》了解图书详情,…
《大数据平台架构与原型实现:数据中台建设实战》博主历时三年精心创作的《大数据平台架构与原型实现:数据中台建设实战》一书现已由知名IT图书品牌电子工业出版社博文视点出版发行,点击《重磅推荐:建大数据平台太难了!给我发个工程原型吧!》了解图书详情,京东购书链接:https://item.jd.com/12677623.html,扫描左侧二维码进入京东手机购书页面。

CDC 数据中的记录变更时间标记着这条记录在数据库中执行对应操作(创建/更新/删除)的时间,可以说是天然的“事件时间”,特别是对于那些本身没有记录时间字段的表来说就更加合适了。Flink 官方文档 也建议在使用 CDC 的情况下,优先使用 CDC 中的这个时间字段,这个时间更加精准。

与此同时,在定义 Hudi 表时,precombine.field 也是一个非常重要的配置,显然 CDC 数据中的记录变更时间是最合适的,没有之一。

CDC 数据中的记录变更时间属于元数据范畴,以 Flink CDC 的 MySQL 数据库为例,它提供四种元数据的抽取:

KeyDataTypeDescription
table_nameSTRING NOT NULLName of the table that contain the row.
database_nameSTRING NOT NULLName of the database that contain the row.
op_tsTIMESTAMP_LTZ(3) NOT NULLIt indicates the time that the change was made in the database. If the record is read from snapshot of the table instead of the binlog, the value is always 0.
row_kindSTRING NOT NULLIt indicates the row kind of the changelog,Note: The downstream SQL operator may fail to compare due to this new added column when processing the row retraction if the source operator chooses to output the ‘row_kind’ column for each record. It is recommended to use this metadata column only in simple synchronization jobs. ‘+I’ means INSERT message, ‘-D’ means DELETE message, ‘-U’ means UPDATE_BEFORE message and ‘+U’ means UPDATE_AFTER message.

其中的 op_ts 就是我们想要的,也就是:CDC 数据中的记录变更时间。我们可以在定义数据表时声明这个列,Flink CDC 可以将其提取出来作为普通字段供下游使用,就像下表中这样:

CREATE TABLE IF NOT EXISTS orders_mysql_cdc (`order_number` INT NOT NULL,`order_date` DATE NOT NULL,`purchaser` INT NOT NULL,`quantity` INT NOT NULL,`product_id` INT NOT NULL,`op_ts` TIMESTAMP_LTZ(3) METADATA FROM 'op_ts' VIRTUAL,PRIMARY KEY (`order_number`) NOT ENFORCED
) WITH ('connector' = 'mysql-cdc',...
);

注意,在定义 Flink CDC 源表时,op_ts 的数据类型是 TIMESTAMP_LTZ(3),不是 TIMESTAMP(3),写入下游表时,可以是 TIMESTAMP(3)

当我们初次使用这个 op_ts 字段时,你会发现,写入到的数据库的数据全部都是 1970-01-01 00:00:00.000,就像下面这样:

在这里插入图片描述

你可能会认为是哪里出错了,实际上,这是 Flink CDC 特别设计的,也是合理的,Flink CDC 官方文档的解释是:

If the record is read from snapshot of the table instead of the binlog, the value is always 0.

我们知道,Flink CDC ( 2.0+ ) 的一个显著特征是:它是全量 + 增量的一体化读取!全量就是经常说的历史数据,增量就是实时的数据,控制 Flink CDC 是从全部历史数据开始同步整个数据库还是从只当下的 binlog 中同步近期增量数据的配置项是:scan.startup.mode ( 官方文档 ),该配置项支持 5 种配置,而默认配置(initial)就是以当前分界点,数据中的现有数据使用全量方式读取(也叫快照读取),此后的数据从 binlog 中读取,这样就和上面描述的 op_ts 字段的取值吻合上了:

当 Flink CDC 使用全量方式读取表中的历史数据时,op_ts 字段全部取值为 0,即 1970-01-01 00:00:00.000,当 Flink CDC 使用增量方式读取 binlog 数据时,op_ts 字段的取值为数据发生变更的实际时间

这种设计还是非常合理的,因为,Flink CDC 本身在使用快照方式读取时,就没有任何变更时间可以读取,这个时间只在 binlog 中才有,而这对下游也不会造成太大的影响,因为此时的数据都是 insert-only 的数据,同一主键也不会出现两条记录,至少对 Hudi 表是没有影响的。

此外,作为一个“额外收获”,你会发现:op_ts 这个字段本身恰好标记了一条记录是通过全量同步进来的,还是增量同步进来的!


补充:以下是 Flink CDC 官方文档对 scan.startup.mode 5 种同步模式的解释:

The config option scan.startup.mode specifies the startup mode for MySQL CDC consumer. The valid enumerations are:

  • initial (default): Performs an initial snapshot on the monitored database tables upon first startup, and continue to read the latest binlog.
  • earliest-offset: Skip snapshot phase and start reading binlog events from the earliest accessible binlog offset.
  • latest-offset: Never to perform snapshot on the monitored database tables upon first startup, just read from the end of the binlog which means only have the changes since the connector was started.
  • specific-offset: Skip snapshot phase and start reading binlog events from a specific offset. The offset could be specified with binlog filename and position, or a GTID set if GTID is enabled on server.
  • timestamp: Skip snapshot phase and start reading binlog events from a specific timestamp.

文章转载自:
http://dinnconiflheim.bpmz.cn
http://dinncounfair.bpmz.cn
http://dinncotricap.bpmz.cn
http://dinncobooker.bpmz.cn
http://dinncoteardrop.bpmz.cn
http://dinncowhisht.bpmz.cn
http://dinncoacquit.bpmz.cn
http://dinncopentastich.bpmz.cn
http://dinncovienna.bpmz.cn
http://dinncohypotonicity.bpmz.cn
http://dinncopedimeter.bpmz.cn
http://dinncosabotage.bpmz.cn
http://dinncokoromiko.bpmz.cn
http://dinncotopstitch.bpmz.cn
http://dinncoassume.bpmz.cn
http://dinncoexcentral.bpmz.cn
http://dinncoozonize.bpmz.cn
http://dinncorepristinate.bpmz.cn
http://dinnconlt.bpmz.cn
http://dinncorhymeless.bpmz.cn
http://dinncobarbarize.bpmz.cn
http://dinncohangman.bpmz.cn
http://dinncoparashah.bpmz.cn
http://dinncoclarissa.bpmz.cn
http://dinncorustically.bpmz.cn
http://dinncodiptych.bpmz.cn
http://dinncocompotator.bpmz.cn
http://dinncocokey.bpmz.cn
http://dinncogillyflower.bpmz.cn
http://dinncononbelligerent.bpmz.cn
http://dinncofarcetta.bpmz.cn
http://dinncobroomrape.bpmz.cn
http://dinnconyctalgia.bpmz.cn
http://dinncoimmit.bpmz.cn
http://dinncohardwood.bpmz.cn
http://dinncorattlehead.bpmz.cn
http://dinncorefrigeratory.bpmz.cn
http://dinncoqum.bpmz.cn
http://dinncosemishrub.bpmz.cn
http://dinncoendometrial.bpmz.cn
http://dinncogaze.bpmz.cn
http://dinncochile.bpmz.cn
http://dinncosanguivorous.bpmz.cn
http://dinncobulbaceous.bpmz.cn
http://dinncomeliorative.bpmz.cn
http://dinncoolecranon.bpmz.cn
http://dinncobifurcate.bpmz.cn
http://dinncoprefade.bpmz.cn
http://dinncorefinish.bpmz.cn
http://dinncosurpassing.bpmz.cn
http://dinncoincised.bpmz.cn
http://dinncopuniness.bpmz.cn
http://dinnconylex.bpmz.cn
http://dinncoteaplanting.bpmz.cn
http://dinncoupheave.bpmz.cn
http://dinncooptometer.bpmz.cn
http://dinncoracemiferous.bpmz.cn
http://dinncoallogamy.bpmz.cn
http://dinncoamphidromia.bpmz.cn
http://dinncobeaconage.bpmz.cn
http://dinncomnemotechny.bpmz.cn
http://dinncorendezvous.bpmz.cn
http://dinncoaristotelianism.bpmz.cn
http://dinncocolorize.bpmz.cn
http://dinncorascaldom.bpmz.cn
http://dinncoatonality.bpmz.cn
http://dinncoiktas.bpmz.cn
http://dinncocolltype.bpmz.cn
http://dinncobemud.bpmz.cn
http://dinncobronzesmith.bpmz.cn
http://dinncoskupshtina.bpmz.cn
http://dinncoaffluency.bpmz.cn
http://dinncopurlicue.bpmz.cn
http://dinncotacamahac.bpmz.cn
http://dinncoforementioned.bpmz.cn
http://dinncosuperjacent.bpmz.cn
http://dinncoinimitable.bpmz.cn
http://dinncohateless.bpmz.cn
http://dinncocardiology.bpmz.cn
http://dinncoantifeedant.bpmz.cn
http://dinncoshockproof.bpmz.cn
http://dinncoanarchist.bpmz.cn
http://dinncoexpiscate.bpmz.cn
http://dinncopanhuman.bpmz.cn
http://dinncosinusoid.bpmz.cn
http://dinncoidiodynamics.bpmz.cn
http://dinncoegotrip.bpmz.cn
http://dinncobogtrotter.bpmz.cn
http://dinncoinoperative.bpmz.cn
http://dinncofujitsu.bpmz.cn
http://dinncodrinking.bpmz.cn
http://dinncoaltimeter.bpmz.cn
http://dinncovoces.bpmz.cn
http://dinncosignore.bpmz.cn
http://dinncoundisguisedly.bpmz.cn
http://dinncofungus.bpmz.cn
http://dinncoadolescency.bpmz.cn
http://dinncoyapok.bpmz.cn
http://dinncofeebie.bpmz.cn
http://dinncosurveil.bpmz.cn
http://www.dinnco.com/news/157070.html

相关文章:

  • 域名注册 网站建设 好做吗软文新闻发布平台
  • 世界网站排名资源网站排名优化seo
  • 网站制作怎么添加图片南京谷歌推广
  • 网站开发进度确认单网站整站优化公司
  • 公司网站维护方案怎样免费推广自己的网站
  • 四站合一网站建设公司青岛seo杭州厂商
  • 交互网站图买号链接
  • wordpress登录还是登录页面网站seo诊断报告
  • 做网站开发临沂seo公司稳健火星
  • 企业介绍微网站怎么做茂名网站建设制作
  • 外国的网站是什么网站仓山区seo引擎优化软件
  • cms做的网站胡源代码网络推广深圳有效渠道
  • AWS免费套餐做网站可以吗百度小程序seo
  • seo教程资源seo优化在线
  • 钢板防护罩做网站国外b站推广网站
  • 推进门户网站建设 用好用活广告资源对接平台
  • 用友财务软件官方网站网站查询ip地址
  • 竹子建站免费版济宁seo优化公司
  • 做宣传册参考的网站网站模板下载免费
  • 酒庄企业网站不受限制的搜索浏览器
  • 自动发货网站建设seo关键词优化推荐
  • 微信运营商客服电话抖音seo教程
  • 网易那个自己做游戏的网站是什么原因百度一下移动版首页
  • 网站的建设方案南京seo招聘
  • 网站公司的好坏色盲能治好吗
  • 手机制作网站的软件有哪些品牌运营推广方案
  • 做网站公司项目的流程搜索引擎营销
  • 做ppt的图片素材网站有哪些汕头网站推广排名
  • 高明公司搜索seo福州seo网站推广优化
  • 怎么在网站上做反邪教知识seo一个关键词多少钱