{"id":15060779,"url":"https://github.com/ocadaruma/scalikejdbc-bigquery","last_synced_at":"2025-04-10T06:11:34.654Z","repository":{"id":57726555,"uuid":"78173663","full_name":"ocadaruma/scalikejdbc-bigquery","owner":"ocadaruma","description":"ScalikeJDBC extension for Google BigQuery","archived":false,"fork":false,"pushed_at":"2020-03-15T01:42:47.000Z","size":89,"stargazers_count":18,"open_issues_count":10,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T07:21:47.429Z","etag":null,"topics":["bigquery","scala","scalikejdbc"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocadaruma.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}},"created_at":"2017-01-06T04:28:03.000Z","updated_at":"2022-12-07T19:56:45.000Z","dependencies_parsed_at":"2022-09-26T21:50:50.783Z","dependency_job_id":null,"html_url":"https://github.com/ocadaruma/scalikejdbc-bigquery","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocadaruma%2Fscalikejdbc-bigquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocadaruma%2Fscalikejdbc-bigquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocadaruma%2Fscalikejdbc-bigquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocadaruma%2Fscalikejdbc-bigquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocadaruma","download_url":"https://codeload.github.com/ocadaruma/scalikejdbc-bigquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","scala","scalikejdbc"],"created_at":"2024-09-24T23:04:24.123Z","updated_at":"2025-04-10T06:11:34.624Z","avatar_url":"https://github.com/ocadaruma.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scalikejdbc-bigquery\n\n[![Build Status](https://travis-ci.org/ocadaruma/scalikejdbc-bigquery.svg?branch=master)](https://travis-ci.org/ocadaruma/scalikejdbc-bigquery)\n\nScalikeJDBC extension for Google BigQuery\n\n## Prerequisites\n\n- Java 8\n- Scala 2.11.x / 2.12.x / 2.13.x\n- ScalikeJDBC 2.4.x or newer\n\n## Installation\n\n```scala\nlibraryDependencies ++= Seq(\n  \"com.mayreh\" %% \"scalikejdbc-bigquery\" % \"0.1.4\",\n  \"com.google.cloud\" % \"google-cloud-bigquery\" % \"1.51.0\",\n  \"org.scalikejdbc\" %% \"scalikejdbc\" % scalikejdbcVersion // specify scalikejdbc version you want. \n)\n```\n\n## Usage\n\n```scala\nimport com.google.auth.oauth2.GoogleCredentials\nimport com.google.cloud.bigquery.{BigQueryOptions, DatasetId}\nimport scalikejdbc._, bigquery._\n\n// instantiate BigQuery service and DatsetId\nval credentials = GoogleCredentials.fromStream(new FileInputStream(\"/path/to/key.json\"))\nval bigQuery = BigQueryOptions.newBuilder()\n  .setCredentials(credentials)\n  .setProjectId(\"your-gcp-project-id\")\n  .build()\n  .getService\n  \nval dataset = DatasetId.of(\"your-gcp-project-id\", \"your-dataset\")\n\n// build query by QueryDSL then execute\nval executor = new QueryExecutor(bigQuery, QueryConfig())\n\nval response = bq {\n  selectFrom(User in dataset as u)\n    .where.eq(u.id, 42)\n}.map(User(_)).single.run(executor)\n\nresponse.result // =\u003e Option[User]\n```\n\nSee also [integration test](https://github.com/ocadaruma/scalikejdbc-bigquery/blob/master/src/it/scala/scalikejdbc/bigquery/QueryDSLIntegration.scala).\n\n## Current status\n\nThis project is still in an early stage. Newer releases can include breaking changes.\n\nBe careful using in production.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focadaruma%2Fscalikejdbc-bigquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focadaruma%2Fscalikejdbc-bigquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focadaruma%2Fscalikejdbc-bigquery/lists"}