Skip to content

Commit 5711967

Browse files
committed
Update README
1 parent 5eabebd commit 5711967

File tree

1 file changed

+73
-11
lines changed

1 file changed

+73
-11
lines changed

README.md

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Usage: tfr [options] <files? | STDIN>
2828
If enabled checks CRC32 on each record
2929
--number | -n <int?>
3030
Number of records to output
31+
--flat | -f <bool>
32+
Output examples as flat JSON objects
3133
```
3234

3335
## Examples
@@ -50,7 +52,67 @@ tfr -n 1 core/src/test/resources/part-00000-of-00004.tfrecords | jq .
5052
cat core/src/test/resources/part-00000-of-00004.tfrecords | tfr -n 1 | jq .
5153
```
5254

53-
### Output Example
55+
### Output
56+
57+
#### Flat
58+
59+
```json
60+
{
61+
"tips": [
62+
0
63+
],
64+
"trip_seconds": [
65+
60
66+
],
67+
"payment_type": [
68+
"Cash"
69+
],
70+
"trip_miles": [
71+
0
72+
],
73+
"dropoff_longitude": [
74+
-87.63785
75+
],
76+
"dropoff_latitude": [
77+
41.893215
78+
],
79+
"pickup_longitude": [
80+
-87.63187
81+
],
82+
"pickup_latitude": [
83+
41.89204
84+
],
85+
"trip_start_timestamp": [
86+
1402934400
87+
],
88+
"trip_start_day": [
89+
2
90+
],
91+
"trip_start_hour": [
92+
16
93+
],
94+
"trip_start_month": [
95+
6
96+
],
97+
"fare": [
98+
3.25
99+
],
100+
"dropoff_census_tract": [
101+
"17031081800"
102+
],
103+
"dropoff_community_area": [
104+
"8"
105+
],
106+
"pickup_community_area": [
107+
"8"
108+
],
109+
"trip_id": [
110+
"8106c1f6-e6f3-426f-9aaf-b4e9703b4f10"
111+
]
112+
}
113+
```
114+
115+
#### Default
54116

55117
```json
56118
{
@@ -66,14 +128,14 @@ cat core/src/test/resources/part-00000-of-00004.tfrecords | tfr -n 1 | jq .
66128
"trip_seconds": {
67129
"int64List": {
68130
"value": [
69-
"60"
131+
60
70132
]
71133
}
72134
},
73135
"payment_type": {
74136
"bytesList": {
75137
"value": [
76-
"Q2FzaA=="
138+
"Cash"
77139
]
78140
}
79141
},
@@ -115,28 +177,28 @@ cat core/src/test/resources/part-00000-of-00004.tfrecords | tfr -n 1 | jq .
115177
"trip_start_timestamp": {
116178
"int64List": {
117179
"value": [
118-
"1402934400"
180+
1402934400
119181
]
120182
}
121183
},
122184
"trip_start_day": {
123185
"int64List": {
124186
"value": [
125-
"2"
187+
2
126188
]
127189
}
128190
},
129191
"trip_start_hour": {
130192
"int64List": {
131193
"value": [
132-
"16"
194+
16
133195
]
134196
}
135197
},
136198
"trip_start_month": {
137199
"int64List": {
138200
"value": [
139-
"6"
201+
6
140202
]
141203
}
142204
},
@@ -150,28 +212,28 @@ cat core/src/test/resources/part-00000-of-00004.tfrecords | tfr -n 1 | jq .
150212
"dropoff_census_tract": {
151213
"bytesList": {
152214
"value": [
153-
"MTcwMzEwODE4MDA="
215+
"17031081800"
154216
]
155217
}
156218
},
157219
"dropoff_community_area": {
158220
"bytesList": {
159221
"value": [
160-
"OA=="
222+
"8"
161223
]
162224
}
163225
},
164226
"pickup_community_area": {
165227
"bytesList": {
166228
"value": [
167-
"OA=="
229+
"8"
168230
]
169231
}
170232
},
171233
"trip_id": {
172234
"bytesList": {
173235
"value": [
174-
"ODEwNmMxZjYtZTZmMy00MjZmLTlhYWYtYjRlOTcwM2I0ZjEw"
236+
"8106c1f6-e6f3-426f-9aaf-b4e9703b4f10"
175237
]
176238
}
177239
}

0 commit comments

Comments
 (0)