{"id":21135845,"url":"https://github.com/kyoshidajp/bqcop","last_synced_at":"2026-05-17T12:34:48.880Z","repository":{"id":34866476,"uuid":"160906832","full_name":"kyoshidajp/bqcop","owner":"kyoshidajp","description":"Save your BigQuery cost.","archived":false,"fork":false,"pushed_at":"2022-03-03T02:41:33.000Z","size":20,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T17:54:00.152Z","etag":null,"topics":["bigquery","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kyoshidajp.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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":"2018-12-08T05:21:45.000Z","updated_at":"2018-12-15T04:58:05.000Z","dependencies_parsed_at":"2022-08-08T02:01:34.513Z","dependency_job_id":null,"html_url":"https://github.com/kyoshidajp/bqcop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoshidajp%2Fbqcop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoshidajp%2Fbqcop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoshidajp%2Fbqcop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoshidajp%2Fbqcop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyoshidajp","download_url":"https://codeload.github.com/kyoshidajp/bqcop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243581063,"owners_count":20314163,"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","golang"],"created_at":"2024-11-20T06:59:17.973Z","updated_at":"2026-05-17T12:34:43.857Z","avatar_url":"https://github.com/kyoshidajp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :policeman: bqcop\n\n[![GitHub release](https://img.shields.io/github/release/kyoshidajp/bqcop.svg?style=flat-square)][release]\n[![Travis](https://travis-ci.org/kyoshidajp/bqcop.svg?branch=master)](https://travis-ci.org/kyoshidajp/bqcop)\n[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godocs]\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]\n\n[release]: https://github.com/kyoshidajp/bqcop/releases\n[license]: https://github.com/kyoshidajp/bqcop/blob/master/LICENSE\n[godocs]: http://godoc.org/github.com/kyoshidajp/bqcop\n\n**bqcop** is CLI to fetch BigQuery jobs and store it to DB.\n\n## Usage\n\n```\nbqcop -project-id=project-id -auth-json=auth-json [options...]\n```\n\nFetch BigQuery jobs executed during the **24 hours from now** by calling [Jobs list API](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/list) and store it to DB.\n\n### Options\n\n```\n-project-id      Project ID of BigQuery.\n\n-auth-json       Auth File of BigQuery.\n\n-db-dialect      Dialect of Database.\n                 default: sqlite3\n\n-db-path         Path of Database.\n                 default: sqlite.db\n\n-d, --debug      Enable debug mode.\n\n-v, --version    Print current version.\n```\n\n### Output\n\n`sqlite.db` which has `bq_jobs` will be generated in your current directory if both `-db-dialect` and `-db-path` are not specified.\n\nSchema of `bq_jobs` table.\n\n| field | type | description |\n| ----- | ---- | --- |\n| id | integer | primary key |\n| created_at | datetime | created time |\n| updated_at | datetime | updated time |\n| deleted_at | datetime | deleted time |\n| job_id | varchar(255) | job id |\n| query | varchar(255) | job query |\n| user_email | varchar(255) | user who exec query |\n| total_bytes_billed | bigint | total bytes of billed |\n| start_time | datetime | job started time |\n| end_time | datetime | job ended time |\n\n## Install\n\n### go get\n\nIf you are a Golang developper/user; then execute `go get`.\n\n```\n$ go get -u github.com/kyoshidajp/bqcop\n```\n\n### Manual\n\n1. Download binary which meets your system from [Releases](https://github.com/kyoshidajp/bqcop/releases).\n1. Unarchive it.\n1. Put `bqcop` where you want.\n1. Add `bqcop` path to `$PATH`.\n\n## Author\n\n[Katsuhiko YOSHIDA](https://github.com/kyoshidajp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyoshidajp%2Fbqcop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyoshidajp%2Fbqcop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyoshidajp%2Fbqcop/lists"}