From your information - you have two files with different structures - this would mean two datasources.
One each for Type A and Type B. You can map it to different objects using transformations - depending on whether you want to treat it as master or transaction data.