Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
GAE to Avro
{:type "record",
:name "SurveyedLocale",
:fields ({:name "ambiguous", :type "boolean", :doc "It is always '<false>'. "}
{:name "ancestorIds", :type "null", :doc "Always nil"}
{:name "countryCode", :type ("null" "string"), :doc "Examples: <RU>, <MN>, <TD>. Size [2,2]. Nil 64.38046%"}
{:name "createUserId", :type "null", :doc "Always nil"}
{:name "createdDateTime",
:type "long",
:doc "Examples: <Fri Feb 14 12:08:02 CET 2014 (1392376082916)>, <Fri Feb 14 12:33:17 CET 2014 (1392377597156)>, <Fri Feb 14 12:09:49 CET 2014 (1392376189069)>. "}
{:name "creationSurveyId",
:type ("null" "long"),
:doc "Examples: <430050>, <54000778>, <54700131>. Range [430031,1935330767]. Nil 57.76396%"}
{:name "currentStatus", :type "null", :doc "Always nil"}
{:name "displayName",
:type ("null" "string"),
:doc "Examples: <empty string>, .... Size [0,598]. Nil 28.12564%"}
{:name "geocells",
:type ("null"
{:type "array",
:items {:type "string", :doc "Examples: <e0910335e>, <e0910335cec4>, <e091033>. Size [1,13]. "}}),
:doc "Size [13,13]. Nil 64.18150%"}
{:name "identifier", :type "string", :doc "Examples: <6gttblyg>, <6gttqm2u>, <6gtt0w5j>. Size [8,14]. "}
{:name "lastSurveyalInstanceId",
:type ("null" "long"),
:doc "Examples: <430097>, <470038>, <410075>. Range [310071,2043500042]. Nil 3.11987%"}
{:name "lastSurveyedDate",
:type ("null" "long"),
:doc "Examples: <Fri Feb 14 13:03:52 CET 2014 (1392379432996)>, <Fri Feb 14 13:14:58 CET 2014 (1392380098340)>, <Fri Feb 14 13:27:40 CET 2014 (1392380860741)>. Nil 3.11987%"}
{:name "lastUpdateDateTime",
:type "long",
:doc "Examples: <Mon Jun 01 12:22:04 CEST 2015 (1433154124781)>, <Mon Jun 01 12:22:04 CEST 2015 (1433154124940)>, <Mon Jun 01 12:22:04 CEST 2015 (1433154124652)>. "}
{:name "lastUpdateUserId", :type "null", :doc "Always nil"}
{:name "latitude",
:type ("null" "double"),
:doc "Examples: <50.68188445125547>, <50.68162842896843>, <50.68173777793686>. Range [-5632.0,4.5678989E7]. Nil 63.98017%"}
{:name "localeType",
:type ("null" "string"),
:doc "Examples: <PublicInstitution>, <Point>, <PRIVATE>. Size [5,17]. Nil 0.00345%"}
{:name "longitude",
:type ("null" "double"),
:doc "Examples: <7.15880423314496>, <7.158764018875604>, <7.160139880733363>. Range [-1307822.0,6.98259771924E11]. Nil 63.98017%"}
{:name "organization",
:type ("null" "string")}
{:name "sublevel1", :type "null", :doc "Always nil"}
{:name "sublevel2", :type "null", :doc "Always nil"}
{:name "sublevel3", :type "null", :doc "Always nil"}
{:name "sublevel4", :type "null", :doc "Always nil"}
{:name "sublevel5", :type "null", :doc "Always nil"}
{:name "sublevel6", :type "null", :doc "Always nil"}
{:name "surveyGroupId",
:type ("null" "long"),
:doc "Examples: <36850021>, <50000029>, <1860688>. Range [340053,2032450021]. Nil 0.47970%"}
{:name "surveyInstanceContrib",
:type ("null"
{:type "array",
:items {:type "long", :doc "Examples: <1520050>, <2310465>, <1840061>. Range [1520050,2043500042]. "}}),
:doc "Size [1,88]. Nil 3.33393%"}
{:name "systemIdentifier", :type "null", :doc "Always nil"}),
:doc "Size [21,27]. ",
:namespace "org.akvo.flow"}
{
"type": "record",
"name": "SurveyedLocale",
"namespace": "com.gallatinsystems.surveyal.domain",
"fields": [
{
"name": "organization",
"type": "string"
},
{
"name": "systemIdentifier",
"type": "string"
},
{
"name": "identifier",
"type": "string"
},
{
"name": "displayName",
"type": "string"
},
{
"name": "countryCode",
"type": "string"
},
{
"name": "sublevel1",
"type": "string"
},
{
"name": "sublevel2",
"type": "string"
},
{
"name": "sublevel3",
"type": "string"
},
{
"name": "sublevel4",
"type": "string"
},
{
"name": "sublevel5",
"type": "string"
},
{
"name": "sublevel6",
"type": "string"
},
{
"name": "surveyInstanceContrib",
"type": {
"type": "array",
"items": "long",
"java-class": "java.util.Set"
}
},
{
"name": "geocells",
"type": {
"type": "array",
"items": "string",
"java-class": "java.util.List"
}
},
{
"name": "localeType",
"type": "string"
},
{
"name": "latitude",
"type": "double"
},
{
"name": "longitude",
"type": "double"
},
{
"name": "ambiguous",
"type": "boolean"
},
{
"name": "currentStatus",
"type": "string"
},
{
"name": "surveyGroupId",
"type": "long"
},
{
"name": "lastSurveyedDate",
"type": {
"type": "record",
"name": "Date",
"namespace": "java.util",
"fields": []
}
},
{
"name": "lastSurveyalInstanceId",
"type": "long"
},
{
"name": "creationSurveyId",
"type": "long"
},
{
"name": "surveyalValues",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "SurveyalValue",
"fields": [
{
"name": "year",
"type": "int"
},
{
"name": "day",
"type": "int"
},
{
"name": "month",
"type": "int"
},
{
"name": "collectionDate",
"type": "java.util.Date"
},
{
"name": "surveyedLocaleId",
"type": "long"
},
{
"name": "surveyInstanceId",
"type": "long"
},
{
"name": "surveyId",
"type": "long"
},
{
"name": "questionText",
"type": "string"
},
{
"name": "surveyQuestionId",
"type": "long"
},
{
"name": "questionGroupOrder",
"type": "int"
},
{
"name": "questionOrder",
"type": "int"
},
{
"name": "metricName",
"type": "string"
},
{
"name": "metricGroup",
"type": "string"
},
{
"name": "metricId",
"type": "long"
},
{
"name": "score",
"type": "double"
},
{
"name": "valueType",
"type": "string"
},
{
"name": "stringValue",
"type": "string"
},
{
"name": "stringValueText",
"type": {
"type": "record",
"name": "Text",
"namespace": "com.google.appengine.api.datastore",
"fields": [
{
"name": "value",
"type": "string"
}
]
}
},
{
"name": "numericValue",
"type": "double"
},
{
"name": "organization",
"type": "string"
},
{
"name": "countryCode",
"type": "string"
},
{
"name": "sublevel1",
"type": "string"
},
{
"name": "sublevel2",
"type": "string"
},
{
"name": "sublevel3",
"type": "string"
},
{
"name": "sublevel4",
"type": "string"
},
{
"name": "sublevel5",
"type": "string"
},
{
"name": "sublevel6",
"type": "string"
},
{
"name": "localeType",
"type": "string"
},
{
"name": "systemIdentifier",
"type": "string"
},
{
"name": "questionType",
"type": "string"
},
{
"name": "key",
"type": {
"type": "record",
"name": "Key",
"namespace": "com.google.appengine.api.datastore",
"fields": [
{
"name": "parentKey",
"type": "Key"
},
{
"name": "kind",
"type": "string"
},
{
"name": "appId",
"type": "string"
},
{
"name": "id",
"type": "long"
},
{
"name": "name",
"type": "string"
}
]
}
},
{
"name": "createdDateTime",
"type": "java.util.Date"
},
{
"name": "lastUpdateDateTime",
"type": "java.util.Date"
},
{
"name": "lastUpdateUserId",
"type": "long"
},
{
"name": "createUserId",
"type": "long"
},
{
"name": "ancestorIds",
"type": {
"type": "array",
"items": "long",
"java-class": "java.util.List"
}
}
]
},
"java-class": "java.util.List"
}
},
{
"name": "key",
"type": "com.google.appengine.api.datastore.Key"
},
{
"name": "createdDateTime",
"type": "java.util.Date"
},
{
"name": "lastUpdateDateTime",
"type": "java.util.Date"
},
{
"name": "lastUpdateUserId",
"type": "long"
},
{
"name": "createUserId",
"type": "long"
},
{
"name": "ancestorIds",
"type": {
"type": "array",
"items": "long",
"java-class": "java.util.List"
}
}
]
}
{:distinct-values #{},
:map {:keys {:ambiguous {:distinct-values #{false},
:pred-map {boolean? {:sample-count 463417}},
:sample-count 463417},
:ancestorIds {:distinct-values #{nil},
:pred-map {nil? {:sample-count 440212}},
:sample-count 440212},
:countryCode {:distinct-values #{nil
"RU"
"MN"
"TD"
"ML"
"NE"
"CD"
"NP"
"LY"
"ZW"
"KE"
"DO"
"DE"
"ET"
"ZM"
"BF"
"MW"
"IN"
"NG"
"UG"},
:hit-distinct-values-limit true,
:pred-map {string? {:max-length 2,
:min-length 2,
:sample-count 165067},
nil? {:sample-count 298350}},
:sample-count 463417},
:createUserId {:distinct-values #{nil},
:pred-map {nil? {:sample-count 463417}},
:sample-count 463417},
:createdDateTime {:distinct-values #{#inst "2014-02-14T11:08:02.916-00:00"
#inst "2014-02-14T11:33:17.156-00:00"
#inst "2014-02-14T11:09:49.069-00:00"
#inst "2014-02-14T11:37:06.957-00:00"
#inst "2014-02-14T11:29:53.774-00:00"
#inst "2014-02-14T11:15:43.860-00:00"
#inst "2014-02-14T11:27:25.910-00:00"
#inst "2014-02-14T11:29:50.353-00:00"
#inst "2014-02-14T11:09:35.794-00:00"
#inst "2014-02-14T10:50:54.451-00:00"
#inst "2014-02-14T11:33:07.357-00:00"
#inst "2014-02-14T11:04:14.366-00:00"
#inst "2014-02-14T11:04:54.270-00:00"
#inst "2014-02-14T11:33:19.967-00:00"
#inst "2014-02-14T11:33:12.057-00:00"
#inst "2014-02-14T11:35:31.641-00:00"
#inst "2014-02-14T11:32:50.266-00:00"
#inst "2014-02-14T11:07:14.842-00:00"
#inst "2014-02-14T11:33:11.546-00:00"
#inst "2014-02-14T11:32:52.955-00:00"},
:hit-distinct-values-limit true,
:pred-map {inst? {:sample-count 463417}},
:sample-count 463417},
:creationSurveyId {:distinct-values #{nil
430050
54000778
54700131
25422183
23542121
2140970
430031
50140148
5310062
53100762
11610095
6560021
1280061
1470044
10530021
1390079
4310021
920021
53170160},
:hit-distinct-values-limit true,
:pred-map {integer? {:max 1935330767,
:min 430031,
:sample-count 195729},
nil? {:sample-count 267688}},
:sample-count 463417},
:currentStatus {:distinct-values #{nil},
:pred-map {nil? {:sample-count 463417}},
:sample-count 463417},
:displayName {:hit-distinct-values-limit true,
:pred-map {string? {:max-length 598,
:min-length 0,
:sample-count 333078},
nil? {:sample-count 128939}},
:sample-count 462017},
:geocells {:distinct-values #{nil},
:elements-coll {:distinct-values #{"e0910335e"
"e0910335cec4"
"e091033"
"e"
"e0910335"
"e091"
"e0"
"e0910335e89"
"e0910335ce"
"e0910335cec"
"e0910335cec4e"
"e0910335e89af"
"e0910335c"
"e0910"
"e0910335e89a"
"e0910335e8"
"e09103"
"e0910335b714"
"e0910335b7146"
"e09"},
:hit-distinct-values-limit true,
:pred-map {string? {:max-length 13,
:min-length 1,
:sample-count 2157857}},
:sample-count 2157857},
:pred-map {sequential? {:max-length 13,
:min-length 13,
:sample-count 165989},
nil? {:sample-count 297428}},
:sample-count 463417},
:identifier {:distinct-values #{"6gttblyg"
"6gttqm2u"
"6gtt0w5j"
"6gty9ia9"
"6gtv1rmk"
"6gttz6q2"
"6gtw6hoa"
"6gtumrhf"
"6gtwjcmp"
"6gtydslg"
"6gttz6pw"
"6gtuvc4y"
"6gtukmbq"
"6gtybng4"
"6gtv873b"
"6gtu5m7h"
"6gtvchff"
"6gttz6q6"
"6gtvn784"
"6gtwarzs"},
:hit-distinct-values-limit true,
:pred-map {string? {:max-length 14,
:min-length 8,
:sample-count 463417}},
:sample-count 463417},
:lastSurveyalInstanceId {:distinct-values #{430097
470038
410075
310082
330076
330066
470022
370043
340065
400083
470023
310071
340125
420067
370042
420038
450082
390104
350135
330084},
:hit-distinct-values-limit true,
:pred-map {integer? {:max 2043500042,
:min 310071,
:sample-count 448959},
nil? {:sample-count 14458}},
:sample-count 463417},
:lastSurveyedDate {:distinct-values #{#inst "2014-02-14T12:03:52.996-00:00"
#inst "2014-02-14T12:14:58.340-00:00"
#inst "2014-02-14T12:27:40.741-00:00"
#inst "2014-02-14T11:15:20.487-00:00"
#inst "2014-02-14T12:07:27.527-00:00"
#inst "2014-02-14T11:19:07.330-00:00"
#inst "2014-02-14T11:07:19.362-00:00"
#inst "2014-02-14T12:19:12.067-00:00"
#inst "2014-02-14T11:21:30.605-00:00"
#inst "2014-02-14T11:16:36.333-00:00"
#inst "2014-02-14T11:10:34.377-00:00"
#inst "2014-02-14T12:08:59.147-00:00"
#inst "2014-02-14T11:50:22.923-00:00"
#inst "2014-02-14T11:24:01.235-00:00"
#inst "2014-02-14T11:13:50.963-00:00"
#inst "2014-02-14T11:08:23.315-00:00"
#inst "2014-02-14T11:07:03.068-00:00"
#inst "2014-02-14T11:28:10.335-00:00"
#inst "2014-02-14T12:08:33.848-00:00"
#inst "2014-02-14T11:05:39.418-00:00"},
:hit-distinct-values-limit true,
:pred-map {inst? {:sample-count 448959},
nil? {:sample-count 14458}},
:sample-count 463417},
:lastUpdateDateTime {:distinct-values #{#inst "2015-06-01T10:22:04.781-00:00"
#inst "2015-06-01T10:22:04.940-00:00"
#inst "2015-06-01T10:22:04.652-00:00"
#inst "2015-06-01T10:22:04.524-00:00"
#inst "2015-06-01T10:22:05.129-00:00"
#inst "2015-06-01T10:22:04.393-00:00"
#inst "2015-06-01T10:22:05.188-00:00"
#inst "2015-06-01T10:22:04.422-00:00"
#inst "2015-06-01T10:22:04.993-00:00"
#inst "2015-06-01T10:22:04.867-00:00"
#inst "2015-06-01T10:22:05.090-00:00"
#inst "2015-06-01T10:22:05.282-00:00"
#inst "2015-06-01T10:22:04.962-00:00"
#inst "2015-06-01T10:22:04.573-00:00"
#inst "2015-06-01T10:22:05.109-00:00"
#inst "2015-06-01T10:22:05.013-00:00"
#inst "2015-06-01T10:22:05.043-00:00"
#inst "2015-06-01T10:22:04.723-00:00"
#inst "2015-06-01T10:22:04.914-00:00"
#inst "2015-06-01T10:22:04.594-00:00"},
:hit-distinct-values-limit true,
:pred-map {inst? {:sample-count 463417}},
:sample-count 463417},
:lastUpdateUserId {:distinct-values #{nil},
:pred-map {nil? {:sample-count 463417}},
:sample-count 463417},
:latitude {:distinct-values #{50.68188445125547
50.68162842896843
50.68173777793686
50.681732221100496
50.68173296078798
50.68183299229418
50.6820131040727
50.68246043860008
50.681967280236904
50.682471853409766
50.68169468314782
50.68194075465913
50.682101829068415
50.68184458709931
50.68212217393395
50.68216660958959
50.68191722710411
50.68176014923202
50.68245878585459
50.681577443184345},
:hit-distinct-values-limit true,
:pred-map {double? {:max 4.5678989E7,
:min -5632.0,
:sample-count 166922},
nil? {:sample-count 296495}},
:sample-count 463417},
:localeType {:distinct-values #{nil
"PublicInstitution"
"Point"
"PRIVATE"
"Household"
"PUBLIC"},
:pred-map {string? {:max-length 17,
:min-length 5,
:sample-count 463401},
nil? {:sample-count 16}},
:sample-count 463417},
:longitude {:distinct-values #{7.15880423314496
7.158764018875604
7.160139880733363
7.158813782373302
7.161251358540787
7.160128575776
7.161127566807769
7.160445231001037
7.16107972241857
7.15911674424567
7.159187388986575
7.160272824158755
7.159275414621383
7.159404649593974
7.159789585044461
7.159091521523888
7.159050341277383
7.1608080662581886
7.159806099017369
7.160437522503278},
:hit-distinct-values-limit true,
:pred-map {double? {:max 6.98259771924E11,
:min -1307822.0,
:sample-count 166922},
nil? {:sample-count 296495}},
:sample-count 463417},
:organization {:distinct-values #{nil
"..."},
:pred-map {string? {:max-length 15,
:min-length 15,
:sample-count 461814},
nil? {:sample-count 1603}},
:sample-count 463417},
:sublevel1 {:distinct-values #{nil},
:pred-map {nil? {:sample-count 445973}},
:sample-count 445973},
:sublevel2 {:distinct-values #{nil},
:pred-map {nil? {:sample-count 445973}},
:sample-count 445973},
:sublevel3 {:distinct-values #{nil},
:pred-map {nil? {:sample-count 445973}},
:sample-count 445973},
:sublevel4 {:distinct-values #{nil},
:pred-map {nil? {:sample-count 445973}},
:sample-count 445973},
:sublevel5 {:distinct-values #{nil},
:pred-map {nil? {:sample-count 445973}},
:sample-count 445973},
:sublevel6 {:distinct-values #{nil},
:pred-map {nil? {:sample-count 445973}},
:sample-count 445973},
:surveyGroupId {:distinct-values #{nil
36850021
50000029
1860688
29260036
21950022
40890022
3590142
54500021
340053
62470021
42630033
5550175
51710022
740021
7900021
43360024
35910021
51050033
54971569},
:hit-distinct-values-limit true,
:pred-map {integer? {:max 2032450021,
:min 340053,
:sample-count 461194},
nil? {:sample-count 24}},
:sample-count 461218},
:surveyInstanceContrib {:distinct-values #{nil},
:elements-coll {:distinct-values #{1520050
2310465
1840061
2370417
1880130
2400135
1850144
1830234
1550031
1530022
1922121
2300529
1860723
1870252
1850165
1560031
2310107
2360254
1940350
1910264},
:hit-distinct-values-limit true,
:pred-map {integer? {:max 2043500042,
:min 1520050,
:sample-count 476913}},
:sample-count 476913},
:pred-map {sequential? {:max-length 88,
:min-length 1,
:sample-count 447967},
nil? {:sample-count 14458}},
:sample-count 462425},
:systemIdentifier {:distinct-values #{nil},
:pred-map {nil? {:sample-count 463417}},
:sample-count 463417}},
:keyword-sample-count 463417,
:sample-count 463417},
:pred-map {map? {:max-length 27,
:min-length 21,
:sample-count 463417}},
:sample-count 463417}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment