Package

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

sqlquery

Permalink

package sqlquery

Visibility
  1. Public
  2. All

Type Members

  1. case class Cache(size: Int, ttl: Int) extends Product with Serializable

    Permalink

    Just LRU cache Stores full IntMap with extracted values as keys and full list Self-describing contexts as values

    Just LRU cache Stores full IntMap with extracted values as keys and full list Self-describing contexts as values

    size

    amount of objects

    ttl

    time in seconds to live

  2. case class Db(postgresql: Option[PostgresqlDb] = None, mysql: Option[MysqlDb] = None) extends Product with Serializable

    Permalink

    Class-container for chosen DB's configuration Exactly one configuration must be provided

    Class-container for chosen DB's configuration Exactly one configuration must be provided

    postgresql

    optional container for PostgreSQL configuration

    mysql

    optional container for MySQL configuration

  3. case class Input(placeholder: Int, pojo: Option[PojoInput], json: Option[JsonInput]) extends Product with Serializable

    Permalink

    Container for key with one (and only one) of possible input sources Basically, represents a key for future template context and way to get value out of EnrichedEvent, custom context, derived event or unstruct event.

    Container for key with one (and only one) of possible input sources Basically, represents a key for future template context and way to get value out of EnrichedEvent, custom context, derived event or unstruct event.

    placeholder

    extracted key

    pojo

    optional pojo source to take straight from EnrichedEvent

    json

    optional JSON source to take from context or unstruct event

  4. case class InvalidConfiguration(message: String) extends Throwable with SqlQueryEnrichmentError with Product with Serializable

    Permalink
  5. case class InvalidDbResponse(message: String) extends Throwable with SqlQueryEnrichmentError with Product with Serializable

    Permalink
  6. case class InvalidInput(message: String) extends Throwable with SqlQueryEnrichmentError with Product with Serializable

    Permalink
  7. case class InvalidStateException(message: String) extends Throwable with SqlQueryEnrichmentError with Product with Serializable

    Permalink
  8. case class JsonInput(field: String, schemaCriterion: String, jsonPath: String) extends Product with Serializable

    Permalink

    field

    where to get this json, one of unstruct_event, contexts or derived_contexts

    schemaCriterion

    self-describing JSON you are looking for in the given JSON field. You can specify only the SchemaVer MODEL (e.g. 1-), MODEL plus REVISION (e.g. 1-1-) etc

    jsonPath

    JSON Path statement to navigate to the field inside the JSON that you want to use as the input

  9. case class JsonOutput(schema: String, describes: String, propertyNames: String) extends Product with Serializable

    Permalink

    Handles JSON-specific output (actually, nothing here is JSON-specific, unlike API Request Enrichment, so all these properties can go into primary Output class as they can be used for *any* output)

  10. case class JsonPathException(message: String) extends Throwable with SqlQueryEnrichmentError with Product with Serializable

    Permalink
  11. case class MysqlDb(host: String, port: Int, sslMode: Boolean, username: String, password: String, database: String) extends Rdbms with Product with Serializable

    Permalink

    Class representing connection configuration for databases speaking MySQL dialect

  12. case class Output(json: JsonOutput, expectedRows: String) extends Product with Serializable

    Permalink

    Container class for output preferences.

    Container class for output preferences. Describes how to transform data fetched from DB into derived contexts

    json

    JSON-preferences

    expectedRows

    specifies amount of expected rows

  13. case class PojoInput(field: String) extends Product with Serializable

    Permalink

    Describes how to take key from POJO source

    Describes how to take key from POJO source

    field

    EnrichedEvent object field

  14. case class PostgresqlDb(host: String, port: Int, sslMode: Boolean, username: String, password: String, database: String) extends Rdbms with Product with Serializable

    Permalink

    Class representing connection configuration for databases speaking PostgreSQL dialect

  15. case class Query(sql: String) extends Product with Serializable

    Permalink
  16. trait Rdbms extends AnyRef

    Permalink

    Common trait for all Databases Contains exception-free logic wrapping JDBC to acquire DB-connection and handle its lifecycle

  17. case class SqlQueryEnrichment(inputs: List[Input], db: Db, query: Query, output: Output, cache: Cache) extends Enrichment with Product with Serializable

    Permalink
  18. sealed trait SqlQueryEnrichmentError extends Throwable

    Permalink
  19. case class ValueNotFoundException(message: String) extends Throwable with SqlQueryEnrichmentError with Product with Serializable

    Permalink

Value Members

  1. object Input extends Serializable

    Permalink

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

  2. object JsonOutput extends Serializable

    Permalink
  3. object Output extends Serializable

    Permalink
  4. object SqlQueryEnrichment extends Serializable

    Permalink

    Companion object containing common methods for requests and manipulating data

  5. object SqlQueryEnrichmentConfig extends ParseableEnrichment

    Permalink

    Lets us create an SqlQueryEnrichmentConfig from a JValue

Ungrouped