Dynamic Lookup 概念

What is Dynamic Lookup?

 When lookup used Dynamic Cache then it's called as a Dynamic Lookup.

在property tab里勾上dynamic lookup的check box

 

What is Dynamic Cache?

 Dynamic Cache may get updated during mapping run. Means new records would be inserted and updated records would be updated in cache during mapping run.

 从底层算法上,lookup的index cache是joiner的两倍,data cache和joiner齐平

How to create Dynamic Looup

 Lookup Transformation-->RightClickà EditàProperties Tab

Dynamic Lookup CacheOption (Check) (Check box should be check)

 

Properties of Dynamic Lookup

 NewLookupRow 

You will get this default port as soon as you checked option for dynamic lookup. In this port you will get three values

0 (For No Operation at Cache)

1 (If record inserted into Cache)

2 (If record Updated in Cache)

利用NewlookupRow可以实现Dedup和Incremental Update.

 Associated Expression 

This option we need to set for each and every lookup port means if you have checked all port as lookup port then we need to set associated port for each and every lookup port. (Basically value in lookup port compared with value of Associated Expression to decide whether Lookup Cache has to insert or update, If so then Lookup Cache will be updated with value of Associated port.)

 Lookup SQL Override

Yahoo!!! Here also, we can override SQL according to our need; If Lookup table is relational table.

 For Updating LookupCache we need to set some more properties. You can choose either ofoption according to your need

a.Insert Else Update

b.Update Else Insert

It’s totally depends on row type, means which type of rows are entering to lookup, is it insert or update. 

Ex: I have use update Strategy before lookup and based upon some condition I am flagging record as DD_UPDATE then row type becomes as update.So, in a simple word if you are passing records from update strategy with(DD_UPDATE) to Lookup then Choose Update Else Inset otherwise choose Insert Else Update. Be careful while choosing this option otherwise your cache won’t be updated.

 Output Old Value on Update

Check box option… Select it according to your requirement if you need lookup to return old value after updating cache with new value.

 Update Dynamic Cache Condition

Through this option we can develop expression. When an expression evaluation is true then only update Cache. Ex: (Source_Sal!= LKP_Sal)

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值