Skip to content

Commit

Permalink
fix: add section on bq auth (#41)
Browse files Browse the repository at this point in the history
* fix: add section on bq auth

* fix: move auth to second page
  • Loading branch information
tconbeer authored Dec 21, 2023
1 parent 28a1fac commit 35e2db2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
14 changes: 13 additions & 1 deletion src/docs/bigquery/grants.md → src/docs/bigquery/auth.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
---
title: "Required Permissions"
title: "Auth and Permissions"
menuOrder: 101
---

## Authentication

This adapter will use [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials) to authenticate with BigQuery and run queries, including both the queries necessary to populate the data catalog and the queries you type into Harlequin. You can use the `gcloud` CLI to pass user credentials to ADC by running:

```bash
gcloud auth application-default login
```

To install the `gcloud` CLI, see [here](https://cloud.google.com/sdk/docs/install).

## Authorization

The user will need the permission to query both [`INFORMATION_SCHEMA.TABLES`](https://cloud.google.com/bigquery/docs/information-schema-tables) and [`INFORMATION_SCHEMA.COLUMNS`](https://cloud.google.com/bigquery/docs/information-schema-columns) to load the data catalog.

To query these views, you need the following Identity and Access Management (IAM) permissions:
Expand Down
4 changes: 4 additions & 0 deletions src/docs/bigquery/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: "Adapter: BigQuery"
menuOrder: 100
---

The BigQuery adapter was contributed by community member Josh Temple. You can view the source for the adapter on [GitHub](https://github.com/joshtemple/harlequin-bigquery).

## Installation

`harlequin-bigquery` depends on `harlequin`, so installing `harlequin-bigquery` will also install Harlequin.
Expand Down Expand Up @@ -59,6 +61,8 @@ You can open Harlequin with the BigQuery adapter by selecting it with the `-a` o
harlequin -a bigquery --project my-gcp-project --location us-west1
```

**See the [next page](/docs/bigquery/auth) for information on authentication and authorization for BigQuery.**

## Configuration

This adapter supports the following options:
Expand Down
2 changes: 1 addition & 1 deletion src/mdsvex/components/ol.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ol
class="mb-2 pl-6 list-outside list-decimal space-y-2 marker:font-bold marker:text-purple"
class="mb-2 list-outside list-decimal space-y-2 pl-6 marker:font-bold marker:text-purple"
>
<slot />
</ol>
2 changes: 1 addition & 1 deletion src/routes/databases.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sqlite from "$lib/assets/databases/sqlite.png";
import postgres from "$lib/assets/databases/icons8-postgres-50.png";
import mysql from "$lib/assets/databases/icons8-mysql-50.png";
import bigquery from "$lib/assets/databases/bigquery.png"
import bigquery from "$lib/assets/databases/bigquery.png";
import clickhouse from "$lib/assets/databases/clickhouse.png";
const databases = [duckdb, sqlite, postgres, mysql, bigquery, clickhouse];
Expand Down

0 comments on commit 35e2db2

Please sign in to comment.