Skip to content
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

Implement BigQuery migration driver #1185

Open
wants to merge 1 commit into
base: master
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCE ?= file go_bindata github github_ee bitbucket aws_s3 google_cloud_storage godoc_vfs gitlab
DATABASE ?= postgres mysql redshift cassandra spanner cockroachdb yugabytedb clickhouse mongodb sqlserver firebird neo4j pgx pgx5 rqlite
DATABASE ?= postgres mysql redshift cassandra spanner cockroachdb yugabytedb clickhouse mongodb sqlserver firebird neo4j pgx pgx5 rqlite bigquery
DATABASE_TEST ?= $(DATABASE) sqlite sqlite3 sqlcipher
VERSION ?= $(shell git describe --tags 2>/dev/null | cut -c 2-)
TEST_FLAGS ?=
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Database drivers run migrations. [Add a new database?](database/driver.go)
* [Firebird](database/firebird)
* [MS SQL Server](database/sqlserver)
* [rqlite](database/rqlite)
* [Big Query](database/bigquery)

### Database URLs

Expand Down Expand Up @@ -194,3 +195,4 @@ Also have a look at the [FAQ](FAQ.md).
---

Looking for alternatives? [https://awesome-go.com/#database](https://awesome-go.com/#database).

20 changes: 20 additions & 0 deletions database/bigquery/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Big Query

See the official [Google Big Query Documentation](https://cloud.google.com/bigquery/docs) for more details.

The provided database URL must be in the following format:

`bigquery://{projectId}/{datasetId}?param=true`

where

- `projectId` is to be replaced with the name of the Google Cloud Platform (GCP) project Id where the Big Query instance has been created.
- `datasetId` is to be replaced with the name of the dataset where migrations will be executed.

| Param | WithInstance Config | Description |
| ------------------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `x-migrations-table` | `MigrationsTable` | Name of the migrations table |
| `x-stmt-timeout` | `StmtTimeout` | Duration after which queries are automatically terminated |
| `x-gcp-credentials-file` | | Location of a credential JSON file to use for authenticating the Big Query client |
| `x-insecure` | | When true it specifies that no authentication should be used. To be used for testing purposes only |
| `x-endpoint` | | Overrides the default endpoint to be used by the client when connecting to the database. To be used for testing purposes only |
Loading
Loading