generalise data path for migrate script