Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
bazzaonline
Creator
Creator

Left Join Nulls to Zeros

Hello All,

I am joining two sets of data using a left join, the second dataset is small therefore doesn't have the same number of records.  How do I input a 0 where there is no record?  For Example

1 - A

2 - B

3 - C

adding

1 - 1

2 - 2

becomes

1 - A - 1

2 - B - 2

3 - C - Null

I would like

1 - A - 1

2 - B - 2

3 - C - 0

Pleas help

10 Replies
maxgro
MVP
MVP

use a mapping load with 0 as third parameter in applymap

map:

mapping load * inline [

from,to

1, 1

2, 2

];

t:

load

  f1,

  f2,

  applymap('map', f1, 0) as f3;

load * inline [

f1,f2

1,A

2,B

3,C

];