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:
https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/packages/bigquery/src/index.js#L328
Environment details
- OS: macOS
- Node.js version: 7.2.0
- npm version: 3.10.9
- google-cloud-node version: 0.9.6
Regards
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
Why in the response, the timestamp is wrapped in a
objectwithvalueas 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:
https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/packages/bigquery/src/index.js#L328
Environment details
Regards