Skip to content

Create and get dataset/table return the same resource but different etags #466

Closed
@mziccard

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.

Metadata

Labels

🚨This issue needs some love.api: bigqueryIssues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.triaged for GAtype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions