Object/Class

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

Input

Related Docs: class Input | package sqlquery

Permalink

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
Visibility
  1. Public
  2. All

Type Members

  1. type ExtractedValue = Value

    Permalink

    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]]

    Permalink

    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

    Permalink

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

    Permalink
  5. object BytePlaceholder extends StatementPlaceholder

    Permalink
  6. object DoublePlaceholder extends StatementPlaceholder

    Permalink
  7. object FloatPlaceholder extends StatementPlaceholder

    Permalink
  8. object IntPlaceholder extends StatementPlaceholder

    Permalink
  9. object LongPlaceholder extends StatementPlaceholder

    Permalink
  10. object StringPlaceholder extends StatementPlaceholder

    Permalink
  11. final def asInstanceOf[T0]: T0

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

    Permalink

    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

  13. def clone(): AnyRef

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

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

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

    Permalink

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

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

    Permalink

    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

  18. def finalize(): Unit

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

    Permalink

    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

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

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

    Permalink

    Get StatementPlaceholder for specified field For e.g.

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

    field

    particular property of EnrichedEvent

    returns

    some

  22. def hashCode(): Int

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

    Permalink

    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

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

    Permalink

    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"

  25. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

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

    Permalink

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

  32. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped