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 Google BigQuery support #72

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

synchrone
Copy link
Contributor

I know this is untested for now, and it would be relatively tricky to set up a test case.
Sending this to test the waters on feasibility of merging upstream.

@mbucc
Copy link
Owner

mbucc commented Oct 25, 2024

Could we use this container

ghcr.io/goccy/bigquery-emulator:0.4.3

to write tests?

Based on the sub process bug report, I am currently updating the shmig_test repo.

But in any case, yes I am interested in merging this.

@synchrone
Copy link
Contributor Author

Great link, thank you!

But it won't work for shmig until goccy/bigquery-emulator#48 is resolved.

We could of course pretend there is information_schema in the test code 😄

@synchrone
Copy link
Contributor Author

synchrone commented Oct 31, 2024

more incompatibilities of bigquery-emulator after faking INFORMATION_SCHEMA.TABLES view with a manually created table:

+ bq_cli 'create table `shmig_version`(version int not null primary key not enforced, migrated_at timestamp default current_timestamp not null);'
+ local 'args=--format csv --dataset_id test --api http://127.0.0.1:9050 --project_id test query --nouse_legacy_sql'
+ [[ 1 -ne 0 ]]
+ /usr/bin/bq --format csv --dataset_id test --api http://127.0.0.1:9050 --project_id test query --nouse_legacy_sql

(ok we can get rid of default values and manually insert migrated_at)

+ bq_cli 'create table `shmig_version`(version int not null primary key not enforced, migrated_at timestamp not null);'
+ local 'args=--format csv --dataset_id test --api http://127.0.0.1:9050 --project_id test query --nouse_legacy_sql'
+ [[ 1 -ne 0 ]]
+ /usr/bin/bq --format csv --dataset_id test --api http://127.0.0.1:9050 --project_id test query --nouse_legacy_sql

it doesn't know what INT is?

At this point I consider the emulator unusable for this case. BigQuery would be absolutely free for running these test cases, and too easy to set up instead of fiddling around the emulator for a theoretical simplicity of not having to get an account and provide credentials for testing.

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.

2 participants