import httplib2
from apiclient import discovery
from oauth2client import appengine
_SCOPE = 'https://www.googleapis.com/auth/bigquery'
PROJECT_ID = 'your_project'
DATASET_ID = 'your_dataset'
TABLE_ID = 'TestTable'
body = {'rows': [{'json': {'Col1': 7}}]}
credentials = appengine.AppAssertionCredentials(scope=_SCOPE)
http = credentials.authorize(httplib2.Http())
bigquery = discovery.build('bigquery', 'v2', http=http)
response = bigquery.tabledata().insertAll(projectId=PROJECT_ID, datasetId=
    DATASET_ID, tableId=TABLE_ID, body=body).execute()
print(response)
Как использовать вставку потоковой передачи Bigquery для движка приложения и Python