saving mappings to file and loading them when inserting data to postgres