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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error running Liquibase: [Simba][BigQueryJDBCDriver](100032) Error executing query job. Message: Table "DATABASECHANGELOGLOCK" must be qualified with a dataset (e.g. dataset.table). [Failed SQL: (100032) CREATE TABLE DATABASECHANGELOGLOCK (ID INT, LOCKED BOOLEAN, LOCKGRANTED datetime, LOCKEDBY STRING(255))] #162

Open
seo-justin opened this issue Jun 26, 2023 · 1 comment

Comments

@seo-justin
Copy link


Issues on GitHub are intended to be related to bugs or feature requests with provider codebase,
so we recommend using our other community resources instead of asking here 馃憤.

I am trying to run the following command on liquibase 4.21.1 and the liquibase-bigquery extension is also 4.21.1.

liquibase update --changelog-file="/db/changelog/changelog-master.yaml" --url="jdbc:bigquery://https://googleapis.com/bigquery/v2:443/my_bq_db;ProjectId=my-gcp-project;OAuthType=0;OAuthServiceAcctEmail=foo@my-gcp-project.iam.gserviceaccount.com;OAuthPvtKeyPath=/gcloud/my-gcp-project-61e489b85654.json" --driver="com.simba.googlebigquery.jdbc42.Driver" --classpath="/SimbaJDBCDriverforGoogleBigQuery42_1.3.3.1004/GoogleBigQueryJDBC42.jar"

this is complaining with the following error:

Unexpected error running Liquibase: [Simba]BigQueryJDBCDriver Error executing query job. Message: Table "DATABASECHANGELOGLOCK" must be qualified with a dataset (e.g. dataset.table). [Failed SQL: (100032) CREATE TABLE DATABASECHANGELOGLOCK (ID INT, LOCKED BOOLEAN, LOCKGRANTED datetime, LOCKEDBY STRING(255))]

  • Caused by: 400 Bad Request
    POST https://bigquery.googleapis.com/bigquery/v2/projects/my-gcp-project/queries
    {
    "code": 400,
    "errors": [
    {
    "domain": "global",
    "message": "Table "DATABASECHANGELOGLOCK" must be qualified with a dataset (e.g. dataset.table).",
    "reason": "invalid"
    }
    ],
    "message": "Table "DATABASECHANGELOGLOCK" must be qualified with a dataset (e.g. dataset.table).",
    "status": "INVALID_ARGUMENT"
    }

I was following the following page: https://contribute.liquibase.com/extensions-integrations/directory/database-tutorials/bigquery/

Was wondering if there's a workaround for this?

@mnichols-dl
Copy link

mnichols-dl commented Nov 6, 2023

Try specifying the DefaultDataset in the connection string, like below:

jdbc:bigquery://https://googleapis.com/bigquery/v2:443;Location=[REGION];ProjectId=[PROJECT ID];DefaultDataset=[DATASET NAME];OAuthType=3;

EDIT: But I do think it should work without needing to specify that. Was thinking the Dataset was part of the host for some reason...

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

No branches or pull requests

2 participants