-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deprecated EventTransformer API (close #68)
- Loading branch information
Showing
14 changed files
with
549 additions
and
2,937 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/main/scala/com.snowplowanalytics.snowplow.analytics.scalasdk/Data.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright (c) 2016-2019 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
package com.snowplowanalytics.snowplow.analytics.scalasdk | ||
|
||
import com.snowplowanalytics.iglu.core.SchemaKey | ||
|
||
/** | ||
* Common data types for enriched event | ||
*/ | ||
object Data { | ||
|
||
/** | ||
* The type (contexts/derived_contexts/unstruct_event) and Iglu URI of a shredded type | ||
*/ | ||
case class ShreddedType(shredProperty: ShredProperty, schemaKey: SchemaKey) | ||
|
||
/** | ||
* Known contexts types of enriched event | ||
*/ | ||
sealed trait ContextsType { | ||
def field: String | ||
} | ||
|
||
case object DerivedContexts extends ContextsType { | ||
def field = "derived_contexts" | ||
} | ||
|
||
case object CustomContexts extends ContextsType { | ||
def field = "contexts" | ||
} | ||
|
||
/** | ||
* Field types of enriched event that can be shredded (self-describing JSONs) | ||
*/ | ||
sealed trait ShredProperty { | ||
/** | ||
* Canonical field name | ||
*/ | ||
def name: String | ||
|
||
/** | ||
* Result output prefix | ||
*/ | ||
def prefix: String | ||
} | ||
|
||
case class Contexts(contextType: ContextsType) extends ShredProperty { | ||
def name = contextType.field | ||
def prefix = "contexts_" | ||
} | ||
|
||
case object UnstructEvent extends ShredProperty { | ||
def name = "unstruct_event" | ||
def prefix = name + "_" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...scala/com.snowplowanalytics.snowplow.analytics.scalasdk/json/BooleanFormatException.scala
This file was deleted.
Oops, something went wrong.
188 changes: 0 additions & 188 deletions
188
src/main/scala/com.snowplowanalytics.snowplow.analytics.scalasdk/json/Data.scala
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.