enrich icon indicating copy to clipboard operation
enrich copied to clipboard

Common: Loader.toCollectorPayload should emit only one bad row and not a list

Open chuwy opened this issue 5 years ago • 2 comments

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.

chuwy avatar Jun 19 '20 16:06 chuwy

Migrated from https://github.com/snowplow/snowplow/issues/4315 (comments are auto-generated)

chuwy avatar Jun 19 '20 16:06 chuwy

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

chuwy avatar Oct 09 '20 20:10 chuwy