Skip to content

Commit aab8238

Browse files
amrkk123q2w
andauthored
feat: Adding regex validation for big query dataset id and adding new output value computed_table_id (#384)
Co-authored-by: abhishek kumar tiwari <[email protected]>
1 parent 33ba574 commit aab8238

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ This module provisions a dataset and a list of tables with associated JSON schem
220220
| external\_table\_names | Friendly names for any external tables being provisioned |
221221
| project | Project where the dataset and tables are created |
222222
| routine\_ids | Unique IDs for any routine being provisioned |
223+
| table\_fqns | Fully qualified names for the table with format projects/{{project}}/datasets/{{dataset}}/tables/{{name}} |
223224
| table\_ids | Unique id for the table being provisioned |
224225
| table\_names | Friendly name for the table being provisioned |
225226
| view\_ids | Unique id for the view being provisioned |

metadata.display.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
dataset_id:
3434
name: dataset_id
3535
title: Dataset Id
36+
regexValidation: ^[a-zA-Z0-9_]{1,1024}$$
37+
validation: Must contain only letters, numbers, or underscores. Must be 1024 characters or fewer.
3638
dataset_labels:
3739
name: dataset_labels
3840
title: Dataset Labels
@@ -84,6 +86,12 @@ spec:
8486
tables:
8587
name: tables
8688
title: Tables
89+
level: 1
90+
altDefaults:
91+
- type: ALTERNATE_TYPE_DC
92+
value:
93+
- schema: "[{\"description\": \"Full visitor ID\",\"mode\": \"NULLABLE\",\"name\": \"fullVisitorId\",\"type\": \"STRING\"},{\"description\": \"Visit number\",\"mode\": \"NULLABLE\",\"name\": \"visitNumber\",\"type\": \"INTEGER\"}]"
94+
table_id: table-1
8795
views:
8896
name: views
8997
title: Views

metadata.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ spec:
357357
type:
358358
- list
359359
- string
360+
- name: table_fqns
361+
description: Fully qualified names for the table with format projects/{{project}}/datasets/{{dataset}}/tables/{{name}}
362+
type:
363+
- list
364+
- string
360365
- name: table_ids
361366
description: Unique id for the table being provisioned
362367
type:

outputs.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ output "table_ids" {
4747
description = "Unique id for the table being provisioned"
4848
}
4949

50+
output "table_fqns" {
51+
value = [
52+
for table in google_bigquery_table.main :
53+
table.id
54+
]
55+
description = "Fully qualified names for the table with format projects/{{project}}/datasets/{{dataset}}/tables/{{name}}"
56+
}
57+
5058
output "table_names" {
5159
value = [
5260
for table in google_bigquery_table.main :

0 commit comments

Comments
 (0)