{"id":27147326,"url":"https://github.com/novucs/local-bigquery","last_synced_at":"2026-05-07T11:32:12.062Z","repository":{"id":286710758,"uuid":"962185762","full_name":"novucs/local-bigquery","owner":"novucs","description":"Run BigQuery locally. A BigQuery emulator for local testing and development.","archived":false,"fork":false,"pushed_at":"2025-09-02T14:42:33.000Z","size":884,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-02T15:37:03.137Z","etag":null,"topics":["bigquery","duckdb","emulator","sqlglot","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/novucs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-07T19:24:47.000Z","updated_at":"2025-09-02T14:42:34.000Z","dependencies_parsed_at":"2025-06-06T15:34:04.145Z","dependency_job_id":null,"html_url":"https://github.com/novucs/local-bigquery","commit_stats":null,"previous_names":["novucs/pybigquery","novucs/local-bigquery"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/novucs/local-bigquery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novucs%2Flocal-bigquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novucs%2Flocal-bigquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novucs%2Flocal-bigquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novucs%2Flocal-bigquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novucs","download_url":"https://codeload.github.com/novucs/local-bigquery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novucs%2Flocal-bigquery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32735104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","duckdb","emulator","sqlglot","testing"],"created_at":"2025-04-08T11:25:48.152Z","updated_at":"2026-05-07T11:32:12.058Z","avatar_url":"https://github.com/novucs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local BigQuery\n\nA local BigQuery implementation written in Python.\n\nUses [SQLGlot](https://github.com/tobymao/sqlglot) for translation, and [DuckDB](https://github.com/duckdb/duckdb) for execution.\n\n## Usage\n\nGrab the container, run it, and hit it with a BigQuery client.\n\n### Docker\nStart the container\n```bash\ndocker run --init -d --rm -p 9050:9050 -v /tmp/local-bigquery/:/data --name bigquery ghcr.io/novucs/local-bigquery:0.2.3\n```\n\nEnter the REPL\n```bash\ndocker exec -it bigquery repl\n```\n\nDelete all projects, datasets, and tables\n```bash\ndocker exec -it bigquery reset\n```\n\nStop the container\n```bash\ndocker stop bigquery\n```\n\n### Docker Compose\n```yaml\nvolumes:\n  bigquery_data: {}\nservices:\n  bigquery:\n    image: ghcr.io/novucs/local-bigquery:0.2.3\n    ports:\n      - \"9050:9050\"\n    environment:\n      # Optional configuration, defaults are shown\n      BIGQUERY_PORT: 9050\n      BIGQUERY_HOST: 0.0.0.0\n      DATA_DIR: /data\n      DEFAULT_PROJECT_ID: local\n      DEFAULT_DATASET_ID: local\n      INTERNAL_PROJECT_ID: internal\n      INTERNAL_DATASET_ID: internal\n      # Support for external connections to Postgres, requires an available Postgres instance.\n      # SELECT * FROM EXTERNAL_QUERY('us.default', 'SELECT 1');\n      POSTGRES_CONNECTION_ID: us.default\n      POSTGRES_URI: postgresql://postgres:example@db:5432/postgres\n    volumes:\n      - bigquery_data:/data\n```\n\n### BQ CLI\n```bash\nbq --api http://localhost:9050 query \"SELECT 1\"\n```\n\n### Python\n```bash\npip install google-cloud-bigquery\n```\n\n```python\nfrom google.cloud import bigquery\nclient = bigquery.Client(client_options={\"api_endpoint\": \"http://localhost:9050\"})\n# ... your code here ...\n```\n\n### SQLAlchemy\n```bash\npip install sqlalchemy-bigquery\n```\n\n```python\nfrom google.cloud import bigquery\nfrom sqlalchemy import create_engine\nclient = bigquery.Client(client_options={\"api_endpoint\": \"http://localhost:9050\"})\nengine = create_engine(\"bigquery://project/dataset\", connect_args={\"client\": client})\n# ... your code here ...\n```\n\n### Testcontainers\n```python\nfrom google.cloud import bigquery\nfrom testcontainers.core.container import DockerContainer\n\nbigquery_image = \"ghcr.io/novucs/local-bigquery:0.2.3\"\nwith DockerContainer(bigquery_image).with_exposed_ports(9050) as container:\n    host = container.get_container_host_ip()\n    port = container.get_exposed_port(9050)\n    client = bigquery.Client(client_options={\"api_endpoint\": f\"http://{host}:{port}\"})\n```\n\n### Go\n```bash\ngo get github.com/googleapis/google-cloud-go/bigquery\n```\n\n```go\npackage main\n\nimport (\n    \"context\"\n\n    \"cloud.google.com/go/bigquery\"\n    \"google.golang.org/api/option\"\n)\n\nfunc main() {\n    ctx := context.Background()\n    client, err := bigquery.NewClient(ctx, \"project\", option.WithEndpoint(\"http://localhost:9050/bigquery/v2/\"))\n    // ... your code here ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovucs%2Flocal-bigquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovucs%2Flocal-bigquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovucs%2Flocal-bigquery/lists"}