Map data from a flat resource (e.g. CSV) to entities.

  • Parameters

    • typeIRI: string

      the type IRI of the entities each record represents

    • matchBasedFlatMappings: DeclarativeMatchBasedFlatMappings

      the flat mapping declarations

    • strategyContext: StrategyContext
    • processFlatResourceFn: ProcessFlatResourceFn

      the function to process the flat resource

    • newIRI: (record: string[]) => string

      a function to generate a new IRI for each record, optionally based on the record

    • onMappedData: (
          entityIRI: string,
          mappedData: any,
          originalRecord: string[],
          index: number,
      ) => Promise<void>

      a function to handle the mapped data

    • Optionalamount: number

      the amount of records to process from the resource

    • Optionaloffset: number

      the offset to start processing from

    Returns Promise<void>