在 Talend 中为特定代码生成特定密钥
Generate specific key for specific code in Talend
我想为 talend 中的特定代码生成特定数字。有些代码是重复的,但我不想为该代码生成不同的数字序列。
在 tMap 中,我使用了 Numeric.sequence("out1.CODE",1,1) 但它没有帮助。有没有办法根据之前匹配的代码替换key。请帮忙
Table 1
code
ABC
ACC
AEB
ACC
AED
BEE
AEB
要求的结果
Table 1
code
key
ABC
1
ACC
2
AEB
3
ACC
2
AED
4
BEE
5
AEB
3
你的工作设计应该是这样的
1- tMap_2 is configured as such
2- thashinput_1 would call thashoutput_1 and tick in the tUniqRow_1 : **Code**
3- tmap_4 configuration is configured as such :
4- tmap_5 configuration is configured as such :
Here is my output :
Starting job string at 16:22 10/05/2022.
[statistics] connecting to socket on port 3404
[statistics] connected
.----+---.
|tLogRow_3|
|=---+--=|
|code|key|
|=---+--=|
|ABC |1 |
|ACC |2 |
|AEB |3 |
|AED |5 |
|BEE |6 |
|ACC |2 |
|AEB |3 |
'----+---'
[statistics] disconnected
Job string ended at 16:22 10/05/2022. [exit code = 0]
我想为 talend 中的特定代码生成特定数字。有些代码是重复的,但我不想为该代码生成不同的数字序列。 在 tMap 中,我使用了 Numeric.sequence("out1.CODE",1,1) 但它没有帮助。有没有办法根据之前匹配的代码替换key。请帮忙
Table 1
code |
---|
ABC |
ACC |
AEB |
ACC |
AED |
BEE |
AEB |
要求的结果
Table 1
code | key |
---|---|
ABC | 1 |
ACC | 2 |
AEB | 3 |
ACC | 2 |
AED | 4 |
BEE | 5 |
AEB | 3 |
你的工作设计应该是这样的
1- tMap_2 is configured as such
2- thashinput_1 would call thashoutput_1 and tick in the tUniqRow_1 : **Code**
3- tmap_4 configuration is configured as such :
4- tmap_5 configuration is configured as such :
Here is my output :
Starting job string at 16:22 10/05/2022.
[statistics] connecting to socket on port 3404
[statistics] connected
.----+---.
|tLogRow_3|
|=---+--=|
|code|key|
|=---+--=|
|ABC |1 |
|ACC |2 |
|AEB |3 |
|AED |5 |
|BEE |6 |
|ACC |2 |
|AEB |3 |
'----+---'
[statistics] disconnected
Job string ended at 16:22 10/05/2022. [exit code = 0]