-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Hi,
Issue: I'm not sure timestamp type are detected correctly and returned with the right format.
Google BigQuery Console is good:
Just to validate the type of time_ts, here is the schema:
NodeJS output
var bigquery = require('@google-cloud/bigquery');
const conn = bigquery({ credentials });
conn.startQuery('SELECT time_ts FROM [bigquery-public-data:hacker_news.comments] LIMIT 3', (queryErr, job) => {
if (queryErr) reject(queryErr);
job.getQueryResults((resultErr, rows) => {
console.log('rows', rows);
// Output:
// rows [ { time_ts: { value: '2015-04-24 12:05:51.000' } },
// { time_ts: { value: '2014-11-04 16:32:25.000' } },
// { time_ts: { value: '2012-05-18 14:12:15.000' } } ]
});
});Why in the response, the timestamp is wrapped in a object with value as attribute ? Is this expected ?
Should not it be: { time_ts: '2015-04-24 12:05:51.000' } ?
I suspect something going wrong and this line being executed:
Environment details
- OS: macOS
- Node.js version: 7.2.0
- npm version: 3.10.9
- google-cloud-node version: 0.9.6
Regards
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.

