Database Reference
In-Depth Information
Because BigQuery doesn't charge for anonymous tables, they have a limited
lifespan—they expire in 24 hours. This lifespan of an anonymous table
cannot be directly changed, although running a query that returns the same
table from the query cache can renew the table so that it will be valid for
another 24 hours.
Here is a Python command that shows the anonymous table created by the
previous query:
>>> table = service.tables().get(
projectId=destination_table['projectId'] ,
datasetId=destination_table['datasetId'] ,
tableId=destination_table['tableId']).execute()
>>> pprint.pprint(table)
{u'creationTime': u'1394986053339',
u'etag': u'…',
u'expirationTime': u'1395072453345',
u'id': u'…,
u'kind': u'bigquery#table',
u'lastModifiedTime': u'1394986053339',
u'numBytes': u'8',
u'numRows': u'1',
u'schema': {u'fields': [{u'mode': u'NULLABLE',
u'name': u'f0_',
u'type': u'INTEGER'}]},
u'selfLink': u'…',
u'tableReference': {
u'datasetId':
u'_0e32b38e1117b2fcea992287c138bd53acfff7cc',
u'projectId': u'bigquery-e2e',
u'tableId':
u'anonde3fd1ade53226f48a842c7518bb9b0fe911e606'},
u'type': u'TABLE'}
Specifying Where to Write Query Results
Sometimes, you want to keep query results around longer than 24 hours.
You can do this by specifying the name of a destination table for the query
rather than letting BigQuery pick the destination. To specify the destination
table, you must use the Jobs.insert() method (not Jobs.query() ),
Search WWH ::




Custom Search