com.snowplowanalytics.snowplow.enrich.common.enrichments.registry.sqlquery

Input

object Input extends Serializable

Companion object, containing common methods for input data manipulation and template context building

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Input
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type ExtractedValue = Value

    Value extracted from POJO or JSON It is wrapped into StatementPlaceholder#Value, because its real type is unknown in compile time and all we need is its method .set(preparedStatement: PreparedStatement, placeholder: Int): Unit to fill PreparedStatement

  2. type PlaceholderMap = Option[IntMap[ExtractedValue]]

    Optional Int-indexed Map of ExtractedValues None means some values were not found and SQL Enrichment shouldn't performed

  3. sealed trait StatementPlaceholder extends AnyRef

    This objects hold a value of some extracted from Input and know how to set this value to PreparedStatement

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. object BooleanPlaceholder extends StatementPlaceholder

  7. object BytePlaceholder extends StatementPlaceholder

  8. object DoublePlaceholder extends StatementPlaceholder

  9. object FloatPlaceholder extends StatementPlaceholder

  10. object IntPlaceholder extends StatementPlaceholder

  11. object LongPlaceholder extends StatementPlaceholder

  12. object StringPlaceholder extends StatementPlaceholder

  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def buildPlaceholderMap(inputs: List[Input], event: EnrichedEvent, derivedContexts: List[JObject], customContexts: List[JObject], unstructEvent: Option[JObject]): ValidationNel[Throwable, PlaceholderMap]

    Build IntMap with all sequental input values It returns Failure if **any** of inputs were extracted with fatal error (not-found is not a fatal error)

    Build IntMap with all sequental input values It returns Failure if **any** of inputs were extracted with fatal error (not-found is not a fatal error)

    inputs

    list of all Input objects

    event

    POJO of enriched event

    derivedContexts

    list of derived contexts

    customContexts

    list of custom contexts

    unstructEvent

    optional unstructured event

    returns

    IntMap if all input values were extracted without error, non-empty list of errors otherwise

  15. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  18. val eventTypeMap: Map[String, String]

    Map all properties inside EnrichedEvent to textual representations of their types It is dynamically configured *once*, when job has started

  19. def extractFromJson(json: JValue): Option[ExtractedValue]

    Extract runtime-typed (wrapped in StatementPlaceholder.Value) value from JSON Objects, Arrays and nulls are mapped to None

    Extract runtime-typed (wrapped in StatementPlaceholder.Value) value from JSON Objects, Arrays and nulls are mapped to None

    json

    JSON, probably extracted by JSONPath

    returns

    Some runtime-typed representation of JSON value or None if it is object, array, null or JNothing

  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def getBySchemaCriterion(contexts: List[JObject], schemaCriterion: String): Option[JValue]

    Get data out of all JSON contexts matching schemaCriterion If more than one context match schemaCriterion, first will be picked

    Get data out of all JSON contexts matching schemaCriterion If more than one context match schemaCriterion, first will be picked

    contexts

    list of self-describing JSON contexts attached to event

    schemaCriterion

    part of URI

    returns

    first (optional) self-desc JSON matched schemaCriterion

  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def getFieldType(field: String): Option[StatementPlaceholder]

    Get StatementPlaceholder for specified field For e.

    Get StatementPlaceholder for specified field For e.g. "geo_longitude" => FloatPlaceholder

    field

    particular property of EnrichedEvent

    returns

    some

  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. def inputsToIntmap(inputs: List[Input]): IntMap[Input]

    Convert list of inputs to IntMap with placeholder as a key It will throw away inputs with clasing placeholders (which is actually valid configuration state).

    Convert list of inputs to IntMap with placeholder as a key It will throw away inputs with clasing placeholders (which is actually valid configuration state). Used only to check consistency of placeholders

  26. def isConsistent[V](intMap: IntMap[V]): Boolean

    Check if there any gaps in keys of IntMap (like 1,2,4,5) and keys contain "1", so they fill all placeholders

    Check if there any gaps in keys of IntMap (like 1,2,4,5) and keys contain "1", so they fill all placeholders

    intMap

    Map with Ints as keys

    returns

    true if Map contains no gaps and has "1"

  27. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    AnyRef
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. val typeHandlersMap: Map[String, StatementPlaceholder { type PlaceholderType >: Boolean with Double with Float with Byte with Int with String }]

    Map all textual representations of types of EnrichedEvent properties to corresponding StatementPlaceholders

  34. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped