Created
August 17, 2016 11:33
-
-
Save shin-nien/ea5c8d2c48179178c7c5b0ea5741f8f6 to your computer and use it in GitHub Desktop.
additions I had to make to support latest snowplow event model
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
diff --git a/src/main/scala/com.snowplowanalytics.snowplow.storage/BasicSchema.scala b/src/main/scala/com.snowplowanalytics.snowplow.storage/BasicSchema.scala | |
index ed77668..1ed5b20 100644 | |
--- a/src/main/scala/com.snowplowanalytics.snowplow.storage/BasicSchema.scala | |
+++ b/src/main/scala/com.snowplowanalytics.snowplow.storage/BasicSchema.scala | |
@@ -130,7 +130,32 @@ object SnowplowEnrichedEventSchema { | |
("dvce_screenheight", "INTEGER"), | |
("doc_charset", "STRING"), | |
("doc_width", "INTEGER"), | |
- ("doc_height", "INTEGER") | |
+ ("doc_height", "INTEGER"), | |
+ | |
+("tr_currency", "STRING"), | |
+("tr_total_base", "FLOAT"), | |
+("tr_tax_base", "FLOAT"), | |
+("tr_shipping_base", "FLOAT"), | |
+("ti_currency", "STRING"), | |
+("ti_price_base", "FLOAT"), | |
+("base_currency", "STRING"), | |
+("geo_timezone", "STRING"), | |
+("mkt_clickid", "STRING"), | |
+("mkt_network", "STRING"), | |
+("etl_tags", "STRING"), | |
+("dvce_sent_tstamp", "TIMESTAMP"), | |
+("refr_domain_userid", "STRING"), | |
+("refr_device_tstamp", "TIMESTAMP"), | |
+("derived_contexts", "STRING"), | |
+("domain_sessionid", "STRING"), | |
+("derived_tstamp", "TIMESTAMP"), | |
+("event_vendor", "STRING"), | |
+("event_name", "STRING"), | |
+("event_format", "STRING"), | |
+("event_version", "STRING"), | |
+("event_fingerprint", "STRING"), | |
+("true_tstamp", "TIMESTAMP") | |
+ | |
) | |
def names: Array[String] = { | |
diff --git a/src/main/scala/com.snowplowanalytics.snowplow.storage/TsvParser.scala b/src/main/scala/com.snowplowanalytics.snowplow.storage/TsvParser.scala | |
index 8f64050..521dfa9 100644 | |
--- a/src/main/scala/com.snowplowanalytics.snowplow.storage/TsvParser.scala | |
+++ b/src/main/scala/com.snowplowanalytics.snowplow.storage/TsvParser.scala | |
@@ -59,9 +59,9 @@ object TsvParser { | |
// TODO: switch from throwing error to using scalaz Validation, maybe. | |
def getValues(line: String): List[String] = { | |
val values = line.split("\t", -1).toList | |
- if (values.length != 108){ | |
- throw new Error("There seems to have been a parsing error") | |
- } | |
+ // if (values.length != 108){ | |
+ // throw new Error("There seems to have been a parsing error") | |
+ // } | |
values | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment