loadCsvFileWithoutWorker = (path, onComplete) => {
  const batchId = Date.now();
  // https://www.papaparse.com/docs#config
  parse(path, {
    delimiter: ',',
    download: true,
    dynamicTyping: true,
    // TODO: header: true lead to large memory consumption
    header: true,
    newline: '',
    quotes: false,
    quoteChar: '"',
    skipEmptyLines: true,
    complete: results => {
      const {
        data,
        meta: {fields},
      } = results;
      onComplete({data, fields, batchId});
    },
  });
}
a utility function that takes as input a path to the file, and returns the
loaded data, its fields, and the batchId  via the callback function

@param {string} path: input file path
@param {function} onComplete: callback function to surface the loaded data
@return an object that contains the loaded data, fields and batch Id.