Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
Mapper handles data mapping/translation tasks.
func NewMapper ¶
NewMapper starts a new background processor and returns the newly created Mapper instance.
type Options ¶
type Options struct { // FromField indicates the input Field in each record used for Mapping. FromField string // FromSource indicates the source for identifiers in FromField. FromSource string // ToSource indicates the source to map identifiers to. ToSource string // Replace is true if the values should be replaced in-place, // false if the mapped values should be appended. Replace bool // DropMissing indicates that rows that could not be mapped should be // dropped from output. If false, empty values are used. DropMissing bool // OutputFormat describes the requested output format. OutputFormat string }
Options records various mapping parameters to control the process.
type Result ¶
type Result struct { // Token for retrieving result metadata. Token string `json:"token"` // Options that were used to drive the mapping process. Options *Options `json:"options"` // Log of the versions/timestamps of data and software used for mapping. Log string `json:"log"` // Methods contains a prose description of the process used to map values. Methods string `json:"methods"` // Citations contains a list of citations that match the Methods. Citations []string `json:"citations"` // NewFilename contains the filename for the output mapped CSV file. NewFilename string `json:"newfilename"` // Stats for how the mapping went. Stats *Stats `json:"stats"` }
Result describes the mapping process and results.
type Stats ¶
type Stats struct { // StartTime of the mapping process. StartTime time.Time `json:"start_time"` // EndTime of the mapping process. EndTime time.Time `json:"end_time"` // TotalRecords counts the total number of records processed. TotalRecords int `json:"total_records"` // SourceMissingRecords counts the number of records that contained a // Source ID that was not in the mapping dataset. SourceMissingRecords int `json:"source_missing_records"` // SourceMissingValues is similar to SourceMissingRecords but instead // counts the number of unique values missing. SourceMissingValues int `json:"source_missing_values"` // DestinationMultipleRecords counts the number of input records that // contained a Source ID that had multiple mapped values each. DestinationMultipleRecords int `json:"destination_multiple_records"` // DestinationMultipleValues is similar to DestinationMultipleRecords // but instead counts the number of unique values with multiple hits. DestinationMultipleValues int `json:"destination_multiple_values"` // DestinationMultipleNewCount counts the number of new records added // as a result of multiple mappings. DestinationMultipleNewCount int `json:"destination_multiple_new"` }
Stats describes various metrics for how the mapping went.
Click to show internal directories.
Click to hide internal directories.