Skip to content

Commit 5550af8

Browse files
vasilylrileykarson
andauthored
Added reservation field to BigQuery Job configuration (#15232)
Co-authored-by: Riley Karson <[email protected]>
1 parent 8c7b27c commit 5550af8

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

mmv1/products/bigquery/Job.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@ examples:
161161
- 'status.0.state'
162162
# there are a lot of examples for this resource, so omitting some that are similar to others
163163
exclude_docs: true
164+
- name: 'bigquery_job_query_reservation'
165+
exclude_docs: true
166+
ignore_read_extra:
167+
- 'etag'
168+
- 'status.0.state'
169+
min_version: beta
170+
primary_resource_id: 'job'
171+
vars:
172+
job_id: 'job_query_reservation'
173+
reservation_name: 'my-reservation'
174+
test_env_vars:
175+
project: 'PROJECT_NAME'
164176
parameters:
165177
properties:
166178
- name: 'user_email'
@@ -859,6 +871,12 @@ properties:
859871
type: String
860872
description: 'The ID of the model.'
861873
required: true
874+
- name: 'reservation'
875+
type: String
876+
description: |
877+
The reservation that job would use. User can specify a reservation to execute the job. If this field is not set, reservation is determined based on the rules defined by the reservation assignments.
878+
The expected format is `projects/{project}/locations/{location}/reservations/{reservation}`.
879+
min_version: beta
862880
- name: 'jobReference'
863881
type: NestedObject
864882
description: |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
resource "google_bigquery_job" "{{$.PrimaryResourceId}}" {
2+
provider = google-beta
3+
4+
job_id = "{{index $.Vars "job_id"}}"
5+
6+
query {
7+
query = "SELECT state FROM [lookerdata:cdc.project_tycho_reports]"
8+
9+
}
10+
11+
reservation = "projects/{{index $.TestEnvVars "project"}}/locations/US/reservations/{{index $.Vars "reservation_name"}}"
12+
}

0 commit comments

Comments
 (0)