Skip to content

feat: add is_case_insensitive #391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ This module provisions a dataset and a list of tables with associated JSON schem
| description | Dataset description. | `string` | `null` | no |
| encryption\_key | Default encryption key to apply to the dataset. Defaults to null (Google-managed). | `string` | `null` | no |
| external\_tables | A list of objects which include table\_id, expiration\_time, external\_data\_configuration, and labels. | <pre>list(object({<br> table_id = string,<br> description = optional(string),<br> autodetect = bool,<br> compression = string,<br> ignore_unknown_values = bool,<br> max_bad_records = number,<br> schema = string,<br> source_format = string,<br> source_uris = list(string),<br> csv_options = object({<br> quote = string,<br> allow_jagged_rows = bool,<br> allow_quoted_newlines = bool,<br> encoding = string,<br> field_delimiter = string,<br> skip_leading_rows = number,<br> }),<br> google_sheets_options = object({<br> range = string,<br> skip_leading_rows = number,<br> }),<br> hive_partitioning_options = object({<br> mode = string,<br> source_uri_prefix = string,<br> }),<br> expiration_time = optional(string, null),<br> max_staleness = optional(string),<br> deletion_protection = optional(bool),<br> labels = optional(map(string), {}),<br> }))</pre> | `[]` | no |
| is\_case\_insensitive | (Optional) TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By default, this is FALSE, which means the dataset and its table names are case-sensitive. This field does not affect routine references. | `bool` | `false` | no |
| location | The location of the dataset. For multi-region, US or EU can be provided. | `string` | `"US"` | no |
| materialized\_views | A list of objects which includes view\_id, view\_query, clustering, time\_partitioning, range\_partitioning, expiration\_time and labels | <pre>list(object({<br> view_id = string,<br> description = optional(string),<br> query = string,<br> enable_refresh = bool,<br> refresh_interval_ms = string,<br> clustering = optional(list(string), []),<br> time_partitioning = optional(object({<br> expiration_ms = string,<br> field = string,<br> type = string,<br> require_partition_filter = bool,<br> }), null),<br> range_partitioning = optional(object({<br> field = string,<br> range = object({<br> start = string,<br> end = string,<br> interval = string,<br> }),<br> }), null),<br> expiration_time = optional(string, null),<br> max_staleness = optional(string),<br> labels = optional(map(string), {}),<br> }))</pre> | `[]` | no |
| max\_time\_travel\_hours | Defines the time travel window in hours | `number` | `null` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ resource "google_bigquery_dataset" "main" {
friendly_name = var.dataset_name
description = var.description
location = var.location
is_case_insensitive = var.is_case_insensitive
delete_contents_on_destroy = var.delete_contents_on_destroy
default_table_expiration_ms = var.default_table_expiration_ms
max_time_travel_hours = var.max_time_travel_hours
Expand Down
3 changes: 3 additions & 0 deletions metadata.display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ spec:
external_tables:
name: external_tables
title: External Tables
is_case_insensitive:
name: is_case_insensitive
title: Is Case Insensitive
location:
name: location
title: Location
Expand Down
4 changes: 4 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ spec:
description: The location of the dataset. For multi-region, US or EU can be provided.
varType: string
defaultValue: US
- name: is_case_insensitive
description: (Optional) TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By default, this is FALSE, which means the dataset and its table names are case-sensitive. This field does not affect routine references.
varType: bool
defaultValue: false
- name: delete_contents_on_destroy
description: (Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.
varType: bool
Expand Down
6 changes: 3 additions & 3 deletions modules/data_warehouse/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ spec:
- iam.googleapis.com
providerVersions:
- source: hashicorp/archive
version: 10.1.0
version: ">= 2.4.2"
- source: hashicorp/google
version: ">= 6.11, < 7"
- source: hashicorp/google-beta
version: ">= 6.11, < 7"
- source: hashicorp/http
version: ">= 2"
- source: hashicorp/local
version: ">=2.4"
version: ">= 2.4"
- source: hashicorp/random
version: 10.1.0
version: ">= 3.6.2"
- source: hashicorp/time
version: ">= 0.9.1"
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ variable "location" {
default = "US"
}

variable "is_case_insensitive" {
description = "(Optional) TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By default, this is FALSE, which means the dataset and its table names are case-sensitive. This field does not affect routine references."
type = bool
default = false
}

variable "delete_contents_on_destroy" {
description = "(Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present."
type = bool
Expand Down