ReferenceAsk
?

Mapper

Type
The value defineMapper returns: the compiled transform for a source, run by the platform.

The value defineMapper returns: the compiled transform for a source, exported from a module for the platform to run. You define it and hand it off; the CLI tests, deploys, and runs it.

Mapper.ts
interface Mapper {
  (params: MapRunParams): Promise<MapRunRecord>
  readonly kind: 'mapper'
  readonly source: string
  readonly config: MapperConfig
}
Fields
source
string
The data source's slug this mapper belongs to.
config
MapperConfig
The map function it was defined with.
Export a mapper
const mapper = defineMapper(Archive, { map });
export default mapper; // the CLI tests, deploys, and runs it