Database Reference
In-Depth Information
'STRING'}]}"
$
TABLE_REF="{'tableId': 'table1', \
'datasetId': 'scratch', \
'projectId': '${PROJECT_ID}'}"
$
curl -H "$(python auth.py)" \
-
H "Content-Type: application/json" \
-
X POST \
--
data-binary "{'tableReference': ${TABLE_REF}, \
'schema': ${SCHEMA}}" \
"${TABLES_URL}"
{
…
"tableReference": {
"projectId": "bigquery-e2e",
"datasetId": "scratch",
"tableId": "table1"
},
"schema": {
"fields": [
{
"name": "foo",
"type": "STRING"
}
]
},
"creationTime": "1376533497018",
"lastModifiedTime": "1376533497018"
}
Tables.get()
The
Tables.get()
method returns the current state of the table. You can
use field projections to return only certain fields (useful because the schema
can be very large), or use the
If-None-Match
header to return only the
result if the table has changed. The
lastModifiedTime
on the table gets
updated whenever any data in the table changes, not just when the table
metadata changes, so looking at the
lastModifiedTime
can let you know
whether you need to reread the table data. For instance, you might want to