Skip to content
Merged
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
12 changes: 2 additions & 10 deletions hacks/bq-olh/artifacts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ data "google_project" "project" {}

resource "google_project_iam_member" "compute_sa_roles" {
for_each = toset([
# "roles/resourcemanager.projectIamAdmin",
"roles/dataproc.worker",
"roles/dataproc.editor",
"roles/bigquery.connectionAdmin",
Expand Down Expand Up @@ -122,7 +123,7 @@ resource "google_compute_instance" "startup-vm" {
tags = ["http-server"]

depends_on = [
google_project_iam_binding.compute_sa
google_project_iam_member.compute_sa_roles
]

boot_disk {
Expand Down Expand Up @@ -155,12 +156,3 @@ resource "google_compute_instance" "startup-vm" {
})
}

# Grant Project IAM Admin role to compute@developer service account
# (add permissions as necessary for what commands you need to run)
resource "google_project_iam_binding" "compute_sa" {
role = "roles/resourcemanager.projectIamAdmin"
project = var.gcp_project_id
members = [
"serviceAccount:${data.google_project.project.number}-compute@developer.gserviceaccount.com",
]
}
8 changes: 8 additions & 0 deletions hacks/bq-olh/solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ bq mk -d --location="${LOCATION}" "${PROJECT_ID}:${DATASET_ID}" < /dev/null

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

You can download the schema of these tables by using the following links. The schemas are in JSON format:

```shell
curl -L -O https://github.com/pbavinck/ghacks-olh-data/releases/download/v1.0.0/orders.json
curl -L -O https://github.com/pbavinck/ghacks-olh-data/releases/download/v1.0.0/order_items.json
curl -L -O https://github.com/pbavinck/ghacks-olh-data/releases/download/v1.0.0/products.json
```

The Iceberg table is created in its own folder within the bucket

```shell
Expand Down
Loading