function checkAndDeriveConfigForPreprocessedEventData()

in src/utils/configUtils.js [518:539]


function checkAndDeriveConfigForPreprocessedEventData(
  samples: Array<Array<?string>>,
): {
  mapping: {[string]: string},
  customTypeInfo: {[string]: {baseType: 'text' | 'number'}}
} {
  const {mapping, customTypeInfo} = deriveMappingAndCustomTypeInfo(
    samples.map(col => col[0]),
  );

  const samplesWithoutHeader = samples.map(col => col.slice(1));
  const schemaSummary = getSignalsSchemaSummary(SignalsHashedEventDataSchema);

  checkIndexOfMapping(mapping, samples);
  checkUnknownMapping(mapping, schemaSummary);
  checkTooManyMapping(mapping, schemaSummary);
  checkInvalidCustomDataMapping(mapping);
  checkMissingMapping(mapping, samplesWithoutHeader, {});
  checkCustomTypeInfo(mapping, customTypeInfo);

  return {mapping, customTypeInfo};
}