Modified tool for data import to populate flat tables