Create and get dataset/table return the same resource but different etags #466
Closed
Description
Creating a dataset returns:
{
"kind": "bigquery#dataset",
"etag": "\"Bop49sEVg6UBKwr7tLdL8AavHaw/xpdkOhgn_hczcTdfFCaB6fS1A2Q\"",
"id": "gcloud-devel:test_create_dataset_tag",
"selfLink": "https://www.googleapis.com/bigquery/v2/projects/gcloud-devel/datasets/test_create_dataset_tag",
"datasetReference": {
"datasetId": "test_create_dataset_tag",
"projectId": "gcloud-devel"
},
"access": [
{
"role": "OWNER",
"specialGroup": "projectOwners"
},
{
"role": "WRITER",
"specialGroup": "projectWriters"
},
{
"role": "READER",
"specialGroup": "projectReaders"
}
],
"creationTime": "1450265774254",
"lastModifiedTime": "1450265774254"
}
Getting that same dataset immediately after creation returns:
{
"kind": "bigquery#dataset",
"etag": "\"Bop49sEVg6UBKwr7tLdL8AavHaw/MTQ1MDI2NTc3NDI1NA\"",
"id": "gcloud-devel:test_create_dataset_tag",
"selfLink": "https://www.googleapis.com/bigquery/v2/projects/gcloud-devel/datasets/test_create_dataset_tag",
"datasetReference": {
"datasetId": "test_create_dataset_tag",
"projectId": "gcloud-devel"
},
"access": [
{
"role": "OWNER",
"specialGroup": "projectOwners"
},
{
"role": "WRITER",
"specialGroup": "projectWriters"
},
{
"role": "READER",
"specialGroup": "projectReaders"
}
],
"creationTime": "1450265774254",
"lastModifiedTime": "1450265774254"
}
As you can see the resources are identical but the etag is different.
This behaviour is unexpected to me and might cause troubles when using the etag value in etagMatch
or etagNotMatch
options.