Lookup Transformation

Overriding the Lookup Query

Lookup Transformation 的 Lookup Query Override不同于Source Qualifier Transformation的SQL Query:

Lookup Transformation必须明确标明SQL中的列名as  COLUMN_NAME,不能用select * ,

而Source Qualifier Transformation可以用select * ,只要列个数和列顺序正确就可以;

Lookup Transformation不需要列和Ports数目一样,也不需要顺序一样,只要sql中的as列名完全一致就可以(区分大小写)。

 

Lookup Query Override: select  1 as COn1,max(a.oRG_wID)  as OrG_WId1  from Wc_POSTN_COACH_a_TEST1 a--

 

Overriding the ORDER BY Clause

For example, a Lookup transformation uses the following lookup condition:
ITEM_ID = IN_ITEM_ID
PRICE <= IN_PRICE

SELECT ITEMS_DIM.ITEM_NAME, ITEMS_DIM.PRICE, ITEMS_DIM.ITEM_ID FROM ITEMS_DIM ORDER BY
ITEMS_DIM.ITEM_ID, ITEMS_DIM.PRICE --

To override the default ORDER BY clause for a relational lookup, complete the following steps:
1. Generate the lookup query in the Lookup transformation.
2. Enter an ORDER BY clause that contains the condition ports in the same order they appear in the Lookup
condition.
3. Place two dashes ‘--’ as a comment notation after the ORDER BY clause to suppress the ORDER BY clause
that the Integration Service generates.
If you override the lookup query with an ORDER BY clause without adding comment notation, the lookup fails.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值