In my environment, I can't insert correct data to the TIMESTAMP column.
- gcloud 0.8.0
- Python 2.7.10
- MacOS X 10.10.5
The following snippet is the smallest reproducible example.
Please let me know that it's a bug or my mistake.
import os
from datetime import datetime
from gcloud import bigquery
GCP_KEY_PATH = os.path.join(os.path.dirname(__file__), './gcpkey.json')
project_id = 'my_project'
dataset = 'tmp'
table_name = 'test'
bq = bigquery.Client.from_service_account_json(GCP_KEY_PATH, project=project_id)
table = bq.dataset(dataset).table(name=table_name)
if not table.exists():
table.schema = [bigquery.SchemaField('time', 'TIMESTAMP')]
table.create()
table.reload()
rows = [[datetime.now()]]
table.insert_data(rows)

In my environment, I can't insert correct data to the
TIMESTAMPcolumn.The following snippet is the smallest reproducible example.
Please let me know that it's a bug or my mistake.