Database Reference
In-Depth Information
"type": "FLOAT"
}
]
},
"numBytes": "0",
"numRows": "0",
"creationTime": "1376537757773",
"lastModifiedTime": "1376537882648"
}
Tables.patch()
Patch enables you update a table without specifying all the fields on the
table. This is especially nice if you want to leave the schema as-is and just
want to update a single field such as
expirationTime
. Here is a
curl
command showing how you can update the expiration time with a simple
request without affecting the schema:
$ EXPIRATION_TIME=$(($(date +"%s")+24*60*60))000
$
curl -H "$(python auth.py)" \
-
H "Content-Type: application/json" \
-
X PATCH \
--
data-binary "{'expirationTime':
'${EXPIRATION_TIME}'}" \
"${TABLES_URL}/table1"
{
…
"tableReference": {
"projectId": "bigquery-e2e",
"datasetId": "scratch",
"tableId": "table1"
},
"schema": {
"fields": [
{
"name": "foo",
"type": "STRING"
},
{