sql Talend - CDC的SQL视图
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql Talend - CDC的SQL视图相关的知识,希望对你有一定的参考价值。
CREATE OR REPLACE VIEW "TCDC_VIEW_bct_mstr" AS
SELECT src."TALEND_CDC_TYPE", src."TALEND_CDC_SUBSCRIBERS_NAME",
max(src."TALEND_CDC_CREATION_DATE") AS "TALEND_CDC_CREATION_DATE",
src.unique_rec_id, targ.dbid, targ.bct_code, targ.ctl_document,
targ.ctl_payments, targ.ctl_adjustments, targ.act_document,
targ.act_payments, targ.act_adjustments, targ.posting_date, targ.initials,
targ.ok_to_post_flag, targ.batch_busy_flag, targ.sb12_claims_flag,
targ.disposition_code, targ.xref_comment, targ.deposit_date,
targ.create_date, targ.calpost_date, targ.purge_date, targ.lockbox,
targ.arf_ok_to_post, targ.client_code, targ.bank_code, targ.ok_to_post_cat,
targ.ok_to_post_user, targ.report_mth, targ.xref_flag, targ.orig_ctl_pmts,
targ.created_by_user, targ.scan_to
FROM "TCDC_bct_mstr" src
LEFT JOIN bct_mstr targ ON src.unique_rec_id = targ.unique_rec_id
WHERE src."TALEND_CDC_STATE"::text = '1'::text
GROUP BY src."TALEND_CDC_SUBSCRIBERS_NAME", src.unique_rec_id, targ.dbid, targ.bct_code, targ.ctl_document, targ.ctl_payments, targ.ctl_adjustments, targ.act_document, targ.act_payments, targ.act_adjustments, targ.posting_date, targ.initials, targ.ok_to_post_flag, targ.batch_busy_flag, targ.sb12_claims_flag, targ.disposition_code, targ.xref_comment, targ.deposit_date, targ.create_date, targ.calpost_date, targ.purge_date, targ.lockbox, targ.arf_ok_to_post, targ.client_code, targ.bank_code, targ.ok_to_post_cat, targ.ok_to_post_user, targ.report_mth, targ.xref_flag, targ.orig_ctl_pmts, targ.created_by_user, targ.scan_to, src."TALEND_CDC_TYPE";
以上是关于sql Talend - CDC的SQL视图的主要内容,如果未能解决你的问题,请参考以下文章
sql Talend - 执行现有过程的SQL触发器
使用 Talend 在 SQL Server 和 Postgres 之间转换日期
talend 与 sql server 2008 R2 的连接问题
使用Talend中的tHiveRow组件运行多个配置单元查询
Flink SQL CDC
Flink SQL CDC