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
$ parquet.tools.Main schema part-r-1.parquet | |
message root { optional binary creationTime (UTF8); optional binary entityId (UTF8); optional binary entityType (UTF8); optional binary event (UTF8); optional binary eventId (UTF8); optional binary eventTime (UTF8); optional group properties { optional binary city (UTF8); optional double rating; optional binary spend (UTF8); optional binary state (UTF8); optional binary store (UTF8); optional binary customer (UTF8) } optional binary targetEntityId (UTF8); optional binary targetEntityType (UTF8); } |
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
$ hadoop parquet.tools.Main cat part-r-1.parquet | |
entityId = 2 entityType = user event = $set eventId = 5iuLzCHXzzehq_R3hjsL1AAAAUvZAVo8gzcZ76dDAEs eventTime = 2015-03-02T05:41:59.484Z properties: .rating = 2.0 targetEntityId = 98 targetEntityType = item creationTime = 2015-03-04T05:29:51.278Z entityId = 1 entityType = order event = $set eventId = 78r6v2QT5GgWWrt_bD_q7wAAAUvjQvWunS1ONY2GyoM eventTime = 2015-03-04T05:29:51.278Z properties: .city = san jose .spend = 11.99 .state = CA .store = Women Apparel .customer = 1 |
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
$ bin/pio export --appid 8 --output /home/exportFinal3 --format parquet |
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
$ curl -i -X POST http://localhost:7070/events.json?accessKey= nE9KITDzprLR6utwUJ9a4qDhscsKsjKFlXMcMsxVEdbkQjqYRm8pFcHHDdrM6Cid -H "Content-Type: application/json" -d '{ | |
> "event" : "$set", | |
> "entityType" : "customer", | |
> "entityId" : "1", | |
> | |
> "properties" : { | |
> "channel" : "email", | |
> “DOB” : “1/12/1970”, | |
> "name" : "sam dolittle" | |
> }, |
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
$ curl -i -X POST http://localhost:7070/events.json?accessKey=nE9KITDzprLR6utwUJ9a4qDhscsKsjKFlXMcMsxVEdbkQjqYRm8pFcHHDdrM6Cid -H "Content-Type: application/json" -d '{ | |
> "event" : "$set", | |
> "entityType" : "order", | |
> "entityId" : "3", | |
> | |
> "properties" : { | |
> "spend" : "4.01", | |
> "city" : "san francisco", | |
> "state" : "CA", | |
> "store" : "Men Apparel" |
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
$ pio app new ordersApp | |
[WARN] [NativeCodeLoader] Unable to load native-hadoop library for your platform... using builtin-java classes where applicable | |
[INFO] [HBLEvents] The table predictionio_eventdata:events_8 doesn't exist yet. Creating now... | |
[INFO] [App$] Initialized Event Store for this app ID: 8. | |
[INFO] [App$] Created new app: | |
[INFO] [App$] Name: ordersApp | |
[INFO] [App$] ID: 8 | |
[INFO] [App$] Access Key: nE9KITDzprLR6utwUJ9a4qDhscsKsjKFlXMcMsxVEdbkQjqYRm8pFcHHDdrM6Cid | |
vagrant@vagrant-ubuntu-trusty-64:~/ $ |
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
{ | |
"event" : "$set", | |
"entityType" : "customer", | |
"entityId" : "<unique id>", | |
"properties" : { | |
"DOB" : "<string>", | |
"channel" : "<string>", | |
"name" : "<string>" | |
} | |
} |
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
{ | |
"event" : "$set", | |
"entityType" : "order", | |
"entityId" : "<unique id>", | |
"properties" : { | |
"spend" : "<val>", | |
"city" : "<string>", | |
"state" : "<string>", | |
"store" : "<string>", | |
"customer" : "<val>" |
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
let engineClient = EngineClient(baseURL: "http://localhost:8000") | |
let query = [ | |
"user": "16398de4-cd17-11e4-afdc-1681e6b88ec1", | |
"num": 5 | |
] | |
engineClient.sendQuery(query) { (request, response, JSON, error) in | |
if let data = JSON as? [String: [[String: AnyObject]]] { | |
... | |
} |
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
class Serving extends LServing[Query, PredictedResult] { | |
override def serve( | |
query: Query, | |
predictedResults: Seq[PredictedResult]): PredictedResult = { | |
predictedResults.filterNot { video.over } | |
} | |
} |
NewerOlder