0
votes
from bigquery import get_client
# JSON key provided by Google
json_key = 'My First Project-5b17b4c077da.json'
client = get_client(json_key_file=json_key, readonly=True)
query = "INSERT INTO NTT.summary001 VALUES ('a','b','c','d','e','f','g','h','i');"
print(query)
try:
    results = client.query(query, timeout=10)
except Exception as e:
    raise e

Error: HttpError: https://bigquery.googleapis.com/bigquery/v2/projects/robotic-column-270803/queries?alt=json returned "Encountered "" at line 1, column 36. [Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)]"> Version: Python 3.5.6 pandas-gbq 0.13.1 BigQuery-Python 1.15.0

1

1 Answers

0
votes

You need backticks ( ` ) around your table id:

query = "INSERT INTO `NTT.summary001` VALUES ('a','b','c','d','e','f','g','h','i');"

You may also need to swap your quotes, the bq client can be picky:

query = 'INSERT INTO `NTT.summary001` VALUES ("a","b","c","d","e","f","g","h","i");'

The error is stating line 1, column 36 which is at the position of 'a'.