• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tMap, Inner Join, NULL, Rejected - Really need help...

#1 2010-09-10 18:59:02

mrsocks
Member
Registered: 2009-12-08
Posts: 57

tMap, Inner Join, NULL, Rejected - Really need help...

Hello

I have a main table that has a few columns:
MAIN_SHIPMENT
id | date | brand_id | item_number

and record in this are currently 1:1 but in the new system will allow 1:X
so the new table structures are going to be:

SHIPMENT
id | date

ITEMS
id | shipment_id | brand_id | item_number

There is also a table Brands that has a relationship to the 'brand_id' field. This field in 'ITEMS' can be null.
Any records in the MAIN_SHIPMENT table that have a brand_id of 4 or 5, i want to change to null, so I am using a tJavaRow action before the tMap.
So technically, the tMap should be receiving null for the brand_id and that should be allowable and so inserted into the ITEMS table...but it's not. It's being bounced into the 'outputRejects' / errors table.

I have attached some images and tried to simplify the explanation, but the images show, of what i can, the actual job. If anyone can provide any suggestions as to what is going on that would be great.

So even though my ITEMS table allows null brand_id values, they are being rejected.
To setup the outputReject, i followed the tutorial on http://www.talendforge.org/tutorials/tu … p;idTuto=9

Thanks.


Uploaded Images

Last edited by mrsocks (2010-09-10 19:04:27)

Offline

#2 2010-09-11 04:16:38

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: tMap, Inner Join, NULL, Rejected - Really need help...

NULL generally does not join to NULL.

you can use COALESCE() in your source query to convert the nulls to a crazy value that wont collide with your id's (-1 or something) that you can then use in your tmap to join with.

Last edited by JohnGarrettMartin (2010-09-11 04:17:20)

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tMap, Inner Join, NULL, Rejected - Really need help...

Board footer

Powered by FluxBB