I had a go at uploading a GC .json file as a new table, but the file gets rejected. Do you know which bits I need to remove? I created a schema based on the ordering of the fields on the JSON file.The error I get is
If anyone else is interested...1. you need to remove all the stuff at the start of the GC JSON activity file so it starts with the actual ride data2. then remove all the stuff at the end of the JSON file after the last line of ride data, I think you need the last line to be blank3. the spacing of fields and text elements in the GC JSON file is not accepted by Big Query, so you'll need to modify them - see example below4. you'll need the schema, or create a JSON that has the schema, and use it to paste into the schema window in BQ. To save you the work, I've attached one.A successful file will look like this:{"SECS": 1, "KM": 0, "WATTS": 0, "CAD": 0, "KPH": 0, "HR": 104, "ALT": 24.8, "LAT": -32.001868, "LON": 141.13594, "SLOPE": 0 }{"SECS": 2, "KM": 0, "WATTS": 0, "CAD": 0, "KPH": 0, "HR": 104, "ALT": 24.6, "LAT": -33.998934, "LON": 141.13234, "SLOPE": 0 }Finally, BQ is very sensitive to file names. I don't know all the rules, but I do know that having a "-" in the filename will cause a parse error.My next challenge is to try to upload data into date partitioned tables so that I can have a whole month in the same table. Should make queries quicker (and cheaper).PS There's some good fun to be had with Google Cloud, and when you sign up and start you get $300 credit.
For the record, our JSON files are fully compliant with RFC 7159. Use of white space is valid.
secs |
cad |
hr |
km |
kph |
nm |
watts |
alt |
lon |
lat |
headwind |
slope |
temp |
interval |
lrbalance |
lte |
rte |
lps |
rps |
smo2 |
thb |
o2hb |
hhb |
so I would need to write a processor script or pipeline to remove the extra columns