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

Shredder

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
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type JsonNodes = List[JsonNode]

    A (possibly empty) list of JsonNodes

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

    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

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

    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

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

    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

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

    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

  14. def finalize(): Unit

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

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

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

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

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

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

    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

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

    Definition Classes
    AnyRef
  23. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped