Skip to content

Commit 64d8030

Browse files
authored
Updated solutions in order to more quickly run the lab for testing. (#179)
2 parents f0294d9 + 3f15e92 commit 64d8030

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

hacks/bq-olh/artifacts/main.tf

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ data "google_project" "project" {}
4747

4848
resource "google_project_iam_member" "compute_sa_roles" {
4949
for_each = toset([
50+
# "roles/resourcemanager.projectIamAdmin",
5051
"roles/dataproc.worker",
5152
"roles/dataproc.editor",
5253
"roles/bigquery.connectionAdmin",
@@ -122,7 +123,7 @@ resource "google_compute_instance" "startup-vm" {
122123
tags = ["http-server"]
123124

124125
depends_on = [
125-
google_project_iam_binding.compute_sa
126+
google_project_iam_member.compute_sa_roles
126127
]
127128

128129
boot_disk {
@@ -155,12 +156,3 @@ resource "google_compute_instance" "startup-vm" {
155156
})
156157
}
157158

158-
# Grant Project IAM Admin role to compute@developer service account
159-
# (add permissions as necessary for what commands you need to run)
160-
resource "google_project_iam_binding" "compute_sa" {
161-
role = "roles/resourcemanager.projectIamAdmin"
162-
project = var.gcp_project_id
163-
members = [
164-
"serviceAccount:${data.google_project.project.number}-compute@developer.gserviceaccount.com",
165-
]
166-
}

hacks/bq-olh/solutions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ bq mk -d --location="${LOCATION}" "${PROJECT_ID}:${DATASET_ID}" < /dev/null
101101

102102
### 4. Create Iceberg-format tables in BigQuery
103103

104+
You can download the schema of these tables by using the following links. The schemas are in JSON format:
105+
106+
```shell
107+
curl -L -O https://github.com/pbavinck/ghacks-olh-data/releases/download/v1.0.0/orders.json
108+
curl -L -O https://github.com/pbavinck/ghacks-olh-data/releases/download/v1.0.0/order_items.json
109+
curl -L -O https://github.com/pbavinck/ghacks-olh-data/releases/download/v1.0.0/products.json
110+
```
111+
104112
The Iceberg table is created in its own folder within the bucket
105113

106114
```shell

0 commit comments

Comments
 (0)