-
Notifications
You must be signed in to change notification settings - Fork 322
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The ability to specify labels on created BigQuery jobs was supposedly added in googleapis/google-cloud-python#5654, but it doesn't work. There is also a comment in the documentation from that same PR referring to Client.update_job() which doesn't even exist.
Environment details
python --version
Python 3.7.3
pip freeze | grep google
google-api-core==1.24.1
google-auth==1.24.0
google-cloud-bigquery==2.6.2
google-cloud-bigtable==1.6.1
google-cloud-core==1.5.0
google-cloud-pubsub==2.2.0
google-cloud-storage==1.35.0
google-crc32c==1.1.0
google-resumable-media==1.2.0
googleapis-common-protos==1.52.0
grpc-google-iam-v1==0.12.3
Code example
job_config = bigquery.QueryJobConfig(labels={"app": "test"})
query_job = client.query("SELECT 1", job_config=job_config)
# no labels seen below
print(query_job.labels)
# try and get a job later, also no labels
job = client.get_job(query_job.job_id)
print(job.labels)
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.