[英]Azure Data Factory error on Sink “UserErrorSchemaMappingCannotInferSinkColumnType”
[英]Azure Data Factory Sink Destination Filter
如何使用 Azure 数据工厂在目标表的更新接收器操作中添加过滤器。
基本上我正在尝试实现以下查询,并且我需要目标接收器中的过滤器 end_date = '9999-12-31 。
update testdb.test_scd2
set end_date = SourceStream.end_date
where cust_id = SourceStream.cust_id
and end_date = '9999-12-31
' ADF 脚本 - 根据 Mark 的评论更新。 但它正在更新目标表中的所有数据。 只需要用 end_date - '9999-12-31' 更新一行
source(output(
cust_id as string,
end_date_new as date
),
allowSchemaDrift: true,
validateSchema: false,
ignoreNoFilesFound: false,
wildcardPaths:['walgreen/source/test_upd.dat']) ~> FFWCustomerUpd
source(output(
cust_id as string,
eff_date as date,
end_date as date,
first_name as string,
last_name as string,
status as string
),
allowSchemaDrift: true,
validateSchema: false,
ignoreNoFilesFound: false,
isolationLevel: 'READ_UNCOMMITTED',
format: 'table') ~> source1
Exists1 alterRow(updateIf(1==1)) ~> AlterTeradataConnectorupd
source1 filter(end_date==toDate('9999-12-31')) ~> Filter1
FFWCustomerUpd, Filter1 exists(FFWCustomerUpd@cust_id == source1@cust_id,
negate:false,
broadcast: 'auto')~> Exists1
AlterTeradataConnectorupd sink(input(
cust_id as string,
eff_date as date,
end_date as date,
first_name as string,
last_name as string,
status as string
),
allowSchemaDrift: true,
validateSchema: false,
deletable:false,
insertable:false,
updateable:true,
upsertable:false,
keys:['cust_id'],
format: 'table',
mapColumn(
cust_id,
end_date = end_date_new
),
skipDuplicateMapInputs: true,
skipDuplicateMapOutputs: true) ~> TeradataConnectorupd
在您的 Alter Row 中为“Update If”设置策略:end_date == 9999-12-31
在接收器中,将您的键列设置为 cust_id
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.