GeezerVison is showing github.com — BigQuery return timestamp field as exponential · Issue #990 · googleapis/google-cloud-node
BigQuery return timestamp field as exponential #990Description
This is the result from the time field in the BigQuery dataset instead of some thing like this

Is there something I'm missing ? Activitystephenplusplus commented on Dec 4, 2015 debopamsengupta commented on Dec 4, 2015 Well, found a workaround as the exponential can be converted into a Unix timestamp using Number(Number(time).toPrecision(10))
But it would be good to just receive the string from BigQuery stephenplusplus commented on Dec 4, 2015 I agree! Which API call is the time field returned in? debopamsengupta commented on Dec 4, 2015 stephenplusplus commented on Dec 4, 2015 debopamsengupta commented on Dec 4, 2015 
Well this is the schema for the table, and the schema type for the field time is TIMESTAMP
stephenplusplus commented on Dec 4, 2015 Got it, thanks. Sorry for all the questions, just wanted to make sure I understood. I think we can sniff out when we are returning these types and convert them to the format that makes sense. Thanks for calling this out! debopamsengupta commented on Dec 4, 2015 jgeewax commented on Dec 8, 2015 Hey guys, any chance we can continue the old behavior by passing a special parameter? That is, what if I really just want the raw data? Can I ask for raw (un-schema-parsed) results? /cc @callmehiphop stephenplusplus commented on Dec 8, 2015 The raw data will still come through in the apiResponse parameter:
table.query('SELECT * FROM ...', function(err, rows, nextQuery, apiResponse) {
// apiResponse:
{
"schema": {
"fields": [
{
"name": "url",
"type": "STRING",
"mode": "NULLABLE"
}
]
},
"rows": [
{
"f": [
{
"v": "https://github.com/jfeaver/hireme"
}
]
}
]
}
});
jgeewax commented on Dec 8, 2015 OK cool :)
Where do we document the full apiResponse object? Do we link back to the
BigQuery page that defines the schema of that object? stephenplusplus commented on Dec 8, 2015 It's a bit of a click-hunt, but if you get to the bigQuery#query docs, the last link on the page ("Jobs: query API Documentation" under the "More information" section) takes you to https://cloud.google.com/bigquery/docs/reference/v2/jobs/query which shows the response body.
I'll open a new issue for making the apiResponse callback parameter linkable directly to the response body. For now, I made a small note in the release notes about the raw response. jgeewax commented on Dec 8, 2015 Oh that's a great idea. Maybe all our apiResponse parameters could point to
the API page on cloud.google.com? stephenplusplus commented on Dec 8, 2015 Yeah, I think that'd be awesome! Issue opened: #1007
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|