{"id":15284123,"url":"https://github.com/jashparekh/bigquery-action","last_synced_at":"2025-05-07T03:24:10.373Z","repository":{"id":37849985,"uuid":"405725627","full_name":"jashparekh/bigquery-action","owner":"jashparekh","description":"This Github action can be used to deploy tables/views schemas to BigQuery.","archived":false,"fork":false,"pushed_at":"2023-03-07T19:59:58.000Z","size":184,"stargazers_count":9,"open_issues_count":7,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T10:46:44.514Z","etag":null,"topics":["actions","bigquery","gbq","github-actions","google","google-bigquery","google-cloud-platform","hacktoberfest"],"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/jashparekh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-09-12T18:46:30.000Z","updated_at":"2023-11-23T15:36:25.000Z","dependencies_parsed_at":"2024-10-23T13:55:45.515Z","dependency_job_id":null,"html_url":"https://github.com/jashparekh/bigquery-action","commit_stats":{"total_commits":227,"total_committers":3,"mean_commits":75.66666666666667,"dds":0.07488986784140972,"last_synced_commit":"45649a14dea6aeacd04c7d9c6aee522621e006a6"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashparekh%2Fbigquery-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashparekh%2Fbigquery-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashparekh%2Fbigquery-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashparekh%2Fbigquery-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jashparekh","download_url":"https://codeload.github.com/jashparekh/bigquery-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252805115,"owners_count":21806929,"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":["actions","bigquery","gbq","github-actions","google","google-bigquery","google-cloud-platform","hacktoberfest"],"created_at":"2024-09-30T14:49:51.013Z","updated_at":"2025-05-07T03:24:10.356Z","avatar_url":"https://github.com/jashparekh.png","language":"Python","readme":"[![Actions Status](https://github.com/jashparekh/bigquery-action/workflows/Lint/badge.svg?branch=main)](https://github.com/jashparekh/bigquery-action/actions)\n[![Actions Status](https://github.com/jashparekh/bigquery-action/workflows/Unit%20Tests/badge.svg?branch=main)](https://github.com/jashparekh/bigquery-action/actions)\n[![Actions Status](https://github.com/jashparekh/bigquery-action/workflows/Integration%20Test/badge.svg?branch=main)](https://github.com/jashparekh/bigquery-action/actions)\n![Version](https://img.shields.io/static/v3.svg?label=Version\u0026message=v1\u0026color=lightgrey\u0026?link=http://left\u0026link=https://github.com/jashparekh/bigquery-action/tree/v3)\n\n\n# BigQuery Github Action\n\nThis Github action can be used to deploy tables/views schemas to BigQuery.\n\n### Simple\n\n```yaml\nname: \"Deploy to BigQuery\"\non:\n  pull_request: {}\n  push:\n      branches: [\"main\"]\n\njobs:\n  deploy_schemas:\n    runs-on: ubuntu-latest\n    name: Deploy to BigQuery\n    steps:\n      # To use this repository's private action,\n      # you must check out the repository\n      - name: Checkout\n        uses: actions/checkout@v2.3.4\n      - name: Deploy schemas to BigQuery\n        uses: jashparekh/bigquery-action@v3\n        env:\n          gcp_project: 'gcp-us-project'\n          dataset_schema_directory: 'gcp-us-project/dataset_name'\n          credentials: ${{ secrets.GCP_SERVICE_ACCOUNT }}\n```\n\n## Configuration\n\n### Required\n\n### `gcp_project` (required, string)\n\nThe full name of the GCP project you want to deploy.\n\nExample: `gcp-us-project`\n\n### `dataset_schema_directory` (required, string)\n\nThe directory in your repository where are you storing the schemas for your tables and views.\n\nExample: `gcp-us-project/dataset_name`\n\n### `credentials` (required, string)\n\nGoogle Service Account with permission to create objects in the specified project. Can be stored as a [repository secret](https://docs.github.com/en/actions/reference/encrypted-secrets)\n\n## Schemas\n\nThis action uses [GBQ](https://github.com/wayfair-incubator/gbq) to deploy to Google BigQuery.\n[GBQ](https://github.com/wayfair-incubator/gbq) now supports specifying partitions with the schema as well.\n\nTo leverage this you need to nest your JSON table schema in a dictionary. An example for the same is given below. Library supports Time and Range based partitioning along with Clustering.\n\nAll the configuration options can be found [here](https://github.com/wayfair-incubator/gbq/blob/main/gbq/dto.py).\n\n```json\n{\n  \"partition\": {\n    \"type\": \"range\",\n    \"definition\": {\n      \"field\": \"ID\",\n      \"range\": {\n        \"start\": 1,\n        \"end\": 100000,\n        \"interval\": 10\n      }\n    }\n  },\n  \"clustering\": [\n    \"ID\"\n  ],\n  \"schema\": [\n    {\n      \"name\": \"ID\",\n      \"type\": \"INTEGER\",\n      \"mode\": \"REQUIRED\"\n    }\n  ]\n}\n```\n\n## Contributing\n\nSee the [Contributing Guide](CONTRIBUTING.md) for additional information.\n\nTo execute tests locally (requires that `docker` and `docker-compose` are installed):\n\n```bash\ndocker-compose run test\n```\n\n## Credits\n\nThis Github Action was originally written by [Jash Parekh](https://github.com/jashparekh).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjashparekh%2Fbigquery-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjashparekh%2Fbigquery-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjashparekh%2Fbigquery-action/lists"}