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

Add BigQuery support #3183

Closed
wants to merge 7 commits into from
Closed

Add BigQuery support #3183

wants to merge 7 commits into from

Conversation

lidalei
Copy link

@lidalei lidalei commented May 28, 2021

This PR adds BigQuery support to flyway. A sample configuration file is

# Long properties can be split over multiple lines by ending each line with a backslash
flyway.locations=filesystem:<path_to_sql_folder>

flyway.url=jdbc:bigquery:https://https://www.googleapis.com/bigquery/v2:443;ProjectId=<gcp_project_id>;Location=EU;OAuthType=0;OAuthServiceAcctEmail=<sa_name>@<gcp_project_id>.iam.gserviceaccount.com;OAuthPvtKeyPath=<path_to_service_account_key_file.json>;
flyway.user='hello'
flyway.password='world'

flyway.driver=com.simba.googlebigquery.jdbc42.Driver
flyway.jarDirs=<path_enclosing_simba_driver>/SimbaJDBCDriverforGoogleBigQuery42_1.2.16.1020

flyway.schemas=flyway
# The simba JDBC driver always creates schema in the US multi-region (doesn't respect the BigQuery Location configuration).
# So we have to manually create the schema and tell flyway to not create schema.
# Please ignore the warning flyway outputs if you have created the schema in the Location.
flyway.createSchemas=false

It supports both versioned and repeatable migrations. The driver can be obtained via Google Cloud. Note BigQuery's limitations in transactional support.

@CLAassistant
Copy link

CLAassistant commented May 28, 2021

CLA assistant check
All committers have signed the CLA.

@DoodleBobBuffPants
Copy link
Contributor

Thanks for the PR! BigQuery support has now been merged and will be available from the next release. To find out more about how to begin using Flyway with BigQuery, visit https://flywaydb.org/documentation/database/big-query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants