{"id":21417342,"url":"https://github.com/staffbase/bigquery-github-action","last_synced_at":"2025-07-19T19:04:13.957Z","repository":{"id":65158486,"uuid":"502920663","full_name":"Staffbase/bigquery-github-action","owner":"Staffbase","description":"GitHub Action for writing data into BigQuery from within a Github workflow","archived":false,"fork":false,"pushed_at":"2024-07-01T21:40:48.000Z","size":88,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-07-03T08:58:35.591Z","etag":null,"topics":["actions","bigquery","github-actions"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Staffbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-13T11:07:35.000Z","updated_at":"2025-05-09T08:03:46.000Z","dependencies_parsed_at":"2024-11-22T19:14:45.908Z","dependency_job_id":"02392702-0ef0-49d8-9d54-3610a6e15b41","html_url":"https://github.com/Staffbase/bigquery-github-action","commit_stats":{"total_commits":22,"total_committers":5,"mean_commits":4.4,"dds":0.2272727272727273,"last_synced_commit":"8f01ecf2264f2c87662f66617abf33727f2dee51"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Staffbase/bigquery-github-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fbigquery-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fbigquery-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fbigquery-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fbigquery-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Staffbase","download_url":"https://codeload.github.com/Staffbase/bigquery-github-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Staffbase%2Fbigquery-github-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265240410,"owners_count":23733017,"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","github-actions"],"created_at":"2024-11-22T19:14:42.512Z","updated_at":"2025-07-14T04:32:58.477Z","avatar_url":"https://github.com/Staffbase.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Write into Google BigQuery\n\n## Description\n\nThis GitHub Action can be used to write data to Google BigQuery from within a GitHub workflow.\nThe GitHub Action authenticates with a Google Cloud Service Account and uses the provided token for writing to BigQuery.\nIt sends a POST request against the `insertAll` [API endpoint](https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insertAll).\n\n## Usage\n\n\u003e ##### Note: this action requires [`actions/checkout`](https://github.com/actions/checkout) to be run first\n\n```yaml\n- name: Checkout\n  uses: actions/checkout@v4\n\n- name: Collect data\n  run: |\n    echo \"TIMESTAMP=$(date --utc +%FT%T%Z)\" \u003e\u003e $GITHUB_ENV\n\n- name: Write to DWH\n  uses: Staffbase/bigquery-github-action@v1.1.0\n  with:\n    credentials_json: ${{ secrets.YOUR_SERVICE_ACCOUNT_KEY }}\n    bigquery_project: bq-your-project-id\n    bigquery_dataset: bq-your-dataset-id\n    bigquery_table: bq-your-table-id\n    payload_json: '{ \"property\": \"${{ env.TIMESTAMP }} this is a test\"}'\n```\n\n## Action Spec:\n\n### Inputs\n\n| Input              | Description                                                  | Required |\n| ------------------ | ------------------------------------------------------------ | -------- |\n| `credentials_json` | The credentials key for the Service Account user used for authentication in JSON format. This is forwarded to the [`google-github-actions/auth`](https://github.com/google-github-actions/auth) action. | true     |\n| `token_lifetime`   | The lifetime of the generated auth token in seconds. The default is 30s. This is forwarded to the [`google-github-actions/auth`](https://github.com/google-github-actions/auth) action. | false    |\n| `bigquery_project` | The Project ID of the project to write to.                   | true     |\n| `bigquery_dataset` | The Dataset ID inside the project to write to.               | true     |\n| `bigquery_table`   | The Table ID inside the dataset to write to.                 | true     |\n| `payload_json`     | The payload to be written into the referenced table in JSON format. It must reflect the schema of the table. In the above example the `property` refers to the column name in the table `bigquery_table` and `${{ env.TIMESTAMP }} this is a test` is the value written into that column. | true     |\n| `timestamp_property_to_add`   | A column name in the `bigquery_table` which is of type `TIMESTAMP`. If provided the a property with this name and the current timestamp as value (in UTC) is added to `payload_json`. | false     |\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## License\n\nThis project is licensed under the Apache-2.0 License - see the [LICENSE.md](LICENSE) file for details.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003cimg src=\"docs/assets/images/staffbase.png\" alt=\"Staffbase GmbH\" width=\"96\" /\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003cb\u003eStaffbase GmbH\u003c/b\u003e\n      \u003cbr /\u003eStaffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: \u003ca href=\"https://staffbase.com/jobs/\" target=\"_blank\" rel=\"noreferrer\"\u003estaffbase.com/jobs\u003c/a\u003e\n      \u003cbr /\u003e\u003ca href=\"https://github.com/Staffbase\" target=\"_blank\" rel=\"noreferrer\"\u003eGitHub\u003c/a\u003e | \u003ca href=\"https://staffbase.com/\" target=\"_blank\" rel=\"noreferrer\"\u003eWebsite\u003c/a\u003e | \u003ca href=\"https://staffbase.com/jobs/\" target=\"_blank\" rel=\"noreferrer\"\u003eJobs\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaffbase%2Fbigquery-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstaffbase%2Fbigquery-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstaffbase%2Fbigquery-github-action/lists"}