Skip to content

Commit

Permalink
Merge pull request #1733 from 600lyy/bigquery-requirepartitionfilter
Browse files Browse the repository at this point in the history
bigquery table require_partition_filter.patch
  • Loading branch information
google-oss-prow[bot] authored Jul 16, 2024
2 parents 746449b + 062f4e1 commit 697f738
Show file tree
Hide file tree
Showing 13 changed files with 921 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ spec:
- field
- range
type: object
requirePartitionFilter:
description: If set to true, queries over this table require a partition
filter that can be used for partition elimination to be specified.
type: boolean
resourceID:
description: Immutable. Optional. The tableId of the resource. Used
for creation and acquisition. When unset, the value of `metadata.name`
Expand Down Expand Up @@ -466,9 +470,10 @@ spec:
time.
type: string
requirePartitionFilter:
description: If set to true, queries over this table require a
partition filter that can be used for partition elimination
to be specified.
description: DEPRECATED. This field is deprecated; please use
the top level field with the same name instead. If set to true,
queries over this table require a partition filter that can
be used for partition elimination to be specified.
type: boolean
type:
description: The supported types are DAY, HOUR, MONTH, and YEAR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
description: "BigQuery Sample Table"
datasetRef:
name: bigquerytabledep
requirePartitionFilter: true
friendlyName: bigquerytable-sample
externalDataConfiguration:
autodetect: true
Expand Down
3 changes: 2 additions & 1 deletion config/tests/samples/create/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,9 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured
// case "fullalloydbcluster":
case "apikeyskeybasic":
case "artifactregistryrepository":
case "bigqueryjob":
case "bigqueryconnectionconnection":
case "bigqueryjob":
case "bigquerytable":
case "custombudget":
case "certificatemanagercertificatemapentry":
case "httpsfunction":
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: bigquery.cnrm.cloud.google.com/v1beta1
kind: BigQueryTable
metadata:
annotations:
cnrm.cloud.google.com/management-conflict-prevention-policy: none
cnrm.cloud.google.com/project-id: ${projectId}
cnrm.cloud.google.com/state-into-spec: merge
finalizers:
- cnrm.cloud.google.com/finalizer
- cnrm.cloud.google.com/deletion-defender
generation: 3
labels:
cnrm-test: "true"
name: bigquerytablesample${uniqueId}
namespace: ${uniqueId}
spec:
datasetRef:
name: bigquerydatasetsample${uniqueId}
externalDataConfiguration:
autodetect: true
compression: NONE
sourceFormat: CSV
sourceUris:
- gs://gcp-public-data-landsat/LC08/01/044/034/LC08_L1GT_044034_20130330_20170310_01_T2/LC08_L1GT_044034_20130330_20170310_01_T2_ANG.txt
friendlyName: bigquerytable-sample-updated
requirePartitionFilter: false
resourceID: bigquerytablesample${uniqueId}
schema: '[{"mode":"NULLABLE","name":"string_field_0","type":"STRING"},{"mode":"NULLABLE","name":"string_field_1","type":"STRING"},{"mode":"NULLABLE","name":"string_field_2","type":"STRING"},{"mode":"NULLABLE","name":"string_field_3","type":"STRING"},{"mode":"NULLABLE","name":"string_field_4","type":"STRING"},{"mode":"NULLABLE","name":"string_field_5","type":"STRING"},{"mode":"NULLABLE","name":"int64_field_6","type":"INTEGER"},{"mode":"NULLABLE","name":"int64_field_7","type":"INTEGER"},{"mode":"NULLABLE","name":"int64_field_8","type":"INTEGER"},{"mode":"NULLABLE","name":"int64_field_9","type":"INTEGER"},{"mode":"NULLABLE","name":"string_field_10","type":"STRING"},{"mode":"NULLABLE","name":"int64_field_11","type":"INTEGER"},{"mode":"NULLABLE","name":"int64_field_12","type":"INTEGER"},{"mode":"NULLABLE","name":"string_field_13","type":"STRING"}]'
status:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: The resource is up to date
reason: UpToDate
status: "True"
type: Ready
creationTime: "1970-01-01T00:00:00Z"
etag: abcdef123456
lastModifiedTime: "1970-01-01T00:00:00Z"
location: US
observedGeneration: 3
selfLink: https://bigquery.googleapis.com/bigquery/v2/projects/${projectId}/datasets/bigquerydatasetsample${uniqueId}/tables/bigquerytablesample${uniqueId}
type: EXTERNAL
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
version: 2
interactions: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
version: 2
interactions: []
Loading

0 comments on commit 697f738

Please sign in to comment.