Object

com.snowplowanalytics.snowplow.enrich.common.utils.shredder

Shredder

Related Doc: package shredder

Permalink

object Shredder

The shredder takes the two fields containing JSONs (contexts and unstructured event properties) and "shreds" their contents into a List of JsonNodes ready for loading into dedicated tables in the database.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Shredder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type JsonNodes = List[JsonNode]

    Permalink

    A (possibly empty) list of JsonNodes

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def extractAndValidateCustomContexts(event: EnrichedEvent)(implicit resolver: Resolver): ValidatedNelMessage[JsonSchemaPairs]

    Permalink

    Extract list of custom contexts out of string and validate each against its schema

    Extract list of custom contexts out of string and validate each against its schema

    event

    The Snowplow enriched event to extract custom context JSONs from

    resolver

    iglu resolver

    returns

    validated list of pairs consist of schema and node

  9. def extractAndValidateDerivedContexts(event: EnrichedEvent)(implicit resolver: Resolver): ValidatedNelMessage[JsonSchemaPairs]

    Permalink

    Extract list of derived contexts out of string and validate each against its schema

    Extract list of derived contexts out of string and validate each against its schema

    event

    The Snowplow enriched event to extract custom context JSONs from

    resolver

    iglu resolver

    returns

    validated list of pairs consist of schema and node

  10. def extractAndValidateUnstructEvent(event: EnrichedEvent)(implicit resolver: Resolver): ValidatedNelMessage[JsonSchemaPairs]

    Permalink

    Extract unstruct event out of EnrichedEvent and validate against it's schema

    Extract unstruct event out of EnrichedEvent and validate against it's schema

    event

    The Snowplow enriched event to find unstruct event in

    resolver

    iglu resolver

    returns

    validated list (empty or single-element) of pairs consist of unstruct event schema and node

  11. def extractUnstructEvent(event: EnrichedEvent)(implicit resolver: Resolver): Option[ValidatedNelMessage[JsonNodes]]

    Permalink

    Extract unstruct event as JsonNode Extraction involves validation against schema Event itself extracted as List (empty or with single element)

    Extract unstruct event as JsonNode Extraction involves validation against schema Event itself extracted as List (empty or with single element)

    event

    The Snowplow enriched event to shred JSONs from

    resolver

    Our implicit Iglu resolver, for schema lookups

    returns

    a Validation containing on Success a List (possible empty) of JsonNodes and on Failure a NonEmptyList of JsonNodes containing error messages

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def shred(event: EnrichedEvent)(implicit resolver: Resolver): ValidatedNelMessage[JsonSchemaPairs]

    Permalink

    Shred the EnrichedEvent's two fields which contain JSONs: contexts and unstructured event properties.

    Shred the EnrichedEvent's two fields which contain JSONs: contexts and unstructured event properties. By shredding we mean:

    1. Verify the two fields contain valid JSONs 2. Validate they conform to JSON Schema 3. For the contexts, break the singular JsonNode into a List of individual context JsonNodes 4. Collect the unstructured event and contexts into a singular List

    event

    The Snowplow enriched event to shred JSONs from

    resolver

    Our implicit Iglu Resolver, for schema lookups

    returns

    a Validation containing on Success a List (possible empty) of JsonNodes and on Failure a NonEmptyList of JsonNodes containing error messages

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped