ODI can't do union/union all / minus etc. by default. As written above you must use views or you must write a KM. One of my friend has written a knowledge module for union and union all. You can look over his KM and download it.
ODI 11.x does support set operations directly despite what the other posts have stated. In your scenario in your interface you would simply create 2 datasets one containing source Table A and the second containing source table B. When you add the second dataset simply specify UNION as the operator between the 2 datasets. Simple.
Well this KM basically developed for ODI 10g ( which we dont have dataset) , this is just a version for 11g , well like everybody i know 11g supports dataset operation.This basically not for only UNION also MINUS and UNION_ALL operations.Also give an example to end-users how to create sub_selects statements too. Plus i guess you dont read full article my example has 3 sources into one target table.