I just have some trouble with the example for creating a table using the BigQuery API: https://developers.google.com/bigquery/docs/developers_guide#creatingatable
Everything before worked just fine but here I always receive a parsing exception... Below the body sent in the request (I actually modified the example to the data and schema of the next example in the tutorial, but had the same issue with the original schema + self generated dataset) and the error response.
When I upload the same dataset using the webinterface and same schema it works like a charm.....
Thanks for any helpful clue!
Joerg
--xxx Content-Type: application/json; charset=UTF-8 { "configuration": { "load": { "schema": { "fields": [ { "name": "Name", "type": "STRING", "mode": "REQUIRED", }, { "name": "Age", "type": "INTEGER", "mode": "REQUIRED", }, { "name": "Weight", "type": "FLOAT", "mode": "REQUIRED", }, { "name": "IsMagic", "type": "BOOLEAN", "mode": "REQUIRED", } ] }, "destinationTable": { "projectId": "536201353583", "datasetId": "Benchmark", "tableId": "syntest2" } "writeDisposition": "WRITE_APPEND" } } } --xxx Content-Type: application/octet-stream "Shooting Star",15,325.5,true "Magic Muffin",12,411.5,true "Blaze",16,312.2,false "Old Red",22,388.2,false --xxx--
{'status': '400', 'content-length': '171', 'expires': 'Fri, 01 Jan 1990 00:00:00 GMT', 'server': 'HTTP Upload Server Built on Apr 30 2012 12:11:36 (1335813096)', 'pragma': 'no-cache', 'cache-control': 'no-cache, no-store, must-revalidate', 'date': 'Thu, 03 May 2012 19:40:00 GMT', 'content-type': 'application/json'} { "error": { "errors": [ { "domain": "global", "reason": "parseError", "message": "Parse Error" } ], "code": 400, "message": "Parse Error" } }