tylertreat/BigQuery-Python

TIMESTAMP returned as unicode

coffenbacher opened this issue · 0 comments

Simple query on a table with a BigQuery TIMESTAMP column 'dt'

    _job_id, results = client.query('SELECT * FROM dataset.table LIMIT 1', timeout=10)

Yields this, instead of what I would expect (ideally a Python datetime or alternatively a UNIX timestamp int):

   print(results)

   [
       {
           u'dt': u'1.447216127E9'
       }, 
   ]