enrich
enrich copied to clipboard
Common: Loader.toCollectorPayload should emit only one bad row and not a list
Loader[T] {
def toCollectorPayload(
line: T,
processor: Processor
): ValidatedNel[BadRow.CPFormatViolation, Option[CollectorPayload]]
The function signature indicates that several CPFormatViolation bad rows can be emitted for one CollectorPayload, whereas it should be maximum one.
Migrated from https://github.com/snowplow/snowplow/issues/4315 (comments are auto-generated)
Following this conversation: https://github.com/snowplow/enrich/pull/328#discussion_r489459966, @benjben. I checked this function and in fact it's not that easy to get rid of NonEmptyList right now - we're blocked by https://github.com/snowplow-incubator/snowplow-badrows/issues/51