Skip to content

Commit

Permalink
feat: add direct controller for BigQueryDataset
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweim committed Oct 31, 2024
1 parent ecc6024 commit 0cc0284
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 328 deletions.
2 changes: 1 addition & 1 deletion apis/bigquery/v1beta1/dataset_reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func NewBigQueryDatasetRef(ctx context.Context, reader client.Reader, obj *BigQu
}

// Use approved External
externalRef := ""
externalRef := valueOf(obj.Status.ExternalRef)
if externalRef == "" {
id.External = asBigQueryDatasetExternal(id.parent, resourceID)
return id, nil
Expand Down
3 changes: 3 additions & 0 deletions apis/bigquery/v1beta1/dataset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ type BigQueryDatasetStatus struct {
// Output only. A hash of the resource.
Etag *string `json:"etag,omitempty"`

// A unique specifier for the BigQueryAnalyticsHubDataExchangeListing resource in GCP.
ExternalRef *string `json:"externalRef,omitempty"`

// Output only. The date when this dataset was last modified, in milliseconds
// since the epoch.
LastModifiedTime *int64 `json:"lastModifiedTime,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions apis/bigquery/v1beta1/zz_generated.deepcopy.go

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
Expand Up @@ -74,7 +74,7 @@ spec:
its access needs to be granted again via an update operation.'
properties:
dataset:
description: The dataset this entry applies to
description: The dataset this entry applies to.
properties:
datasetId:
description: A unique Id for this dataset, without the
Expand All @@ -85,6 +85,9 @@ spec:
projectId:
description: The ID of the project containing this dataset.
type: string
required:
- datasetId
- projectId
type: object
targetTypes:
description: Which resources in the dataset this entry applies
Expand All @@ -93,6 +96,9 @@ spec:
items:
type: string
type: array
required:
- dataset
- targetTypes
type: object
domain:
description: '[Pick one] A domain to grant access to. Any users
Expand Down Expand Up @@ -143,6 +149,10 @@ spec:
only letters (a-z, A-Z), numbers (0-9), or underscores
(_). The maximum length is 256 characters.
type: string
required:
- datasetId
- projectId
- routineId
type: object
specialGroup:
description: |-
Expand Down Expand Up @@ -183,6 +193,10 @@ spec:
allow suffixing of the table Id with a partition decorator,
such as `sample_table$20190123`.
type: string
required:
- datasetId
- projectId
- tableId
type: object
type: object
type: array
Expand Down Expand Up @@ -369,6 +383,10 @@ spec:
etag:
description: Output only. A hash of the resource.
type: string
externalRef:
description: A unique specifier for the BigQueryAnalyticsHubDataExchangeListing
resource in GCP.
type: string
lastModifiedTime:
description: Output only. The date when this dataset was last modified,
in milliseconds since the epoch.
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.

Loading

0 comments on commit 0cc0284

Please sign in to comment.