{"id":15494719,"url":"https://github.com/minodisk/bigquery-runner","last_synced_at":"2025-07-23T08:33:56.969Z","repository":{"id":37816596,"uuid":"429337548","full_name":"minodisk/bigquery-runner","owner":"minodisk","description":"An extension to query BigQuery directly and view the results in VSCode.","archived":false,"fork":false,"pushed_at":"2024-03-10T16:50:13.000Z","size":11974,"stargazers_count":47,"open_issues_count":6,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T20:48:31.477Z","etag":null,"topics":["bigquery","extension","query","sql","standard-sql","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=minodisk.bigquery-runner","language":"TypeScript","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/minodisk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"minodisk"}},"created_at":"2021-11-18T07:36:04.000Z","updated_at":"2025-04-16T06:11:29.000Z","dependencies_parsed_at":"2024-02-05T17:01:14.015Z","dependency_job_id":"87c3c787-8c97-4815-9f1b-4db6b0cfd0ff","html_url":"https://github.com/minodisk/bigquery-runner","commit_stats":null,"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"purl":"pkg:github/minodisk/bigquery-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minodisk%2Fbigquery-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minodisk%2Fbigquery-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minodisk%2Fbigquery-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minodisk%2Fbigquery-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minodisk","download_url":"https://codeload.github.com/minodisk/bigquery-runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minodisk%2Fbigquery-runner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266645150,"owners_count":23961658,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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","extension","query","sql","standard-sql","vscode","vscode-extension"],"created_at":"2024-10-02T08:15:03.406Z","updated_at":"2025-07-23T08:33:56.941Z","avatar_url":"https://github.com/minodisk.png","language":"TypeScript","readme":"\u003c!-- DO NOT EDIT\nThis file is generated from gen-src/README.md.ejs. --\u003e\n# BigQuery Runner [![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fminodisk%2Fbigquery-runner%2Fbadge%3Fref%3Dmain\u0026style=flat-square)](https://actions-badge.atrox.dev/minodisk/bigquery-runner/goto?ref=main) [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/minodisk.bigquery-runner?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=minodisk.bigquery-runner) [![Codecov](https://img.shields.io/codecov/c/github/minodisk/bigquery-runner?style=flat-square)](https://app.codecov.io/gh/minodisk/bigquery-runner/)\n\nAn extension to query BigQuery directly and view the results in VSCode.\n\n![Preview](https://user-images.githubusercontent.com/514164/180352233-ed635538-f064-4389-814a-c3ec306aa832.gif)\n\n## Features\n\n- Mark errors in queries.\n    - If the query error can be corrected automatically, suggest a candidate for a quick fix.\n- Run queries:\n    - from files.\n    - from selected text.\n    - with query parameters.\n- Display the results in viewers:\n    - Rows\n        - Fast rendering of large result tables.\n        - Pagination.\n        - Can be downloaded as a file.\n    - Table\n        - Temporary tables can be opened in yet another viewer.\n    - Schema\n    - Routine\n    - Job\n- Download the rows in a variety of formats, both from the viewer and from the query file:\n    - JSON Lines\n    - JSON\n    - CSV\n    - Markdown\n    - Plain text\n        - Pretty formatted text like a table.\n- All operations can be executed from [commands](#commands).\n    - Therefore, it can be set to be performed with [keyboard shortcuts](#keyboard-shortcuts).\n    - Of course, it can also be operated from the GUI.\n\n## Installation\n\n1. Go to [the page of this extension in Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=minodisk.bigquery-runner).\n2. Click the `Install` button.\n3. This will open the VSCode page for this extension, and click the `Install` button.\n\n## Authentication\n\nThis extension requires authentication to the Google Cloud API. You can get started by authenticating in one of the following two ways.\n\n### Gcloud Credential ([Recommended](https://cloud.google.com/iam/docs/best-practices-service-accounts#development))\n\n\u003c!-- 1. [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install).\n1. Run `BigQuery Runner: Login` in the VSCode command palette.\n1. Set `bigqueryRunner.projectId` in `setting.json`.\n\nor --\u003e\n\n1. [Install the gcloud CLI](https://cloud.google.com/sdk/docs/install).\n1. Run [`gcloud auth application-default login`](https://cloud.google.com/sdk/gcloud/reference/auth/application-default) in your terminal.\n1. Set `bigqueryRunner.projectId` in `setting.json`.\n\n- Don't set `bigqueryRunner.keyFilename` in `setting.json`.\n- Don't set `GOOGLE_APPLICATION_CREDENTIALS` as an environment variable.\n\n### Service Account Key\n\n1. [Create a service account and its key](https://cloud.google.com/docs/authentication/getting-started).\n    - Give the service account the necessary roles. Such as [`roles/bigquery.user`](https://cloud.google.com/bigquery/docs/access-control#bigquery.user) for example.\n1. Tell the key path to this extension in one of the following two ways:\n    - Set the path to the key `bigqueryRunner.keyFilename` in `settings.json`.\n    - [Set the path to the key as the environment variable `GOOGLE_APPLICATION_CREDENTIALS`](https://cloud.google.com/docs/authentication/getting-started#setting_the_environment_variable).\n\n## Usage\n\n1. Open a query file with `.bqsql` extension.\n1. Open the command palette.\n1. Run `BigQuery Runner: Run`.\n\n### Query parameters\n\nIf query has one or more named parameters, the extension will ask you for the values of that parameter. The values must be given in JSON format, e.g. quotation marks should be used for simple values such as `\"20231224\"`. See below for more complex examples.\n\nOnce set, the parameters are saved for future use and should be reset if necessary using the [bigqueryRunner.clearParams](#bigquery-runner-clear-parameters) command.\n\n![Parameters usage](https://user-images.githubusercontent.com/514164/178248203-a24126dc-4ade-4e6f-93ae-200702edfa51.gif)\n\n## Commands\n\n### BigQuery Runner: Login\n\n|ID|\n|---|\n|bigqueryRunner.login|\n\nLogin with `gcloud auth application-default login`.\n\n### BigQuery Runner: Logout\n\n|ID|\n|---|\n|bigqueryRunner.logout|\n\nLogout with `gcloud auth application-default revoke`.\n\n### BigQuery Runner: Run\n\n|ID|\n|---|\n|bigqueryRunner.run|\n\nRun the query in BigQuery and display the results. If text is selected, it will run the selected text as a query. If no text is selected, the entire file will be executed as a query.\n\n### BigQuery Runner: Dry Run\n\n|ID|\n|---|\n|bigqueryRunner.dryRun|\n\nDry-run the query in BigQuery and display the result. If there is an error in the query, the wrong token of the query will be marked.\n\n### BigQuery Runner: Previous Page\n\n|ID|\n|---|\n|bigqueryRunner.prevPage|\n\nFetch and display the results of the previous page.\n\n### BigQuery Runner: Next Page\n\n|ID|\n|---|\n|bigqueryRunner.nextPage|\n\nFetch and display the results of the next page.\n\n### BigQuery Runner: Focus on Left Tab\n\n|ID|\n|---|\n|bigqueryRunner.focusOnLeftTab|\n\nFocus on the left tab in the viewer.\n\n### BigQuery Runner: Focus on Right Tab\n\n|ID|\n|---|\n|bigqueryRunner.focusOnRightTab|\n\nFocus on the right tab in the viewer.\n\n### BigQuery Runner: Focus on Rows Tab\n\n|ID|\n|---|\n|bigqueryRunner.focusOnRowsTab|\n\nFocus on the rows tab in the viewer.\n\n### BigQuery Runner: Focus on Table Tab\n\n|ID|\n|---|\n|bigqueryRunner.focusOnTableTab|\n\nFocus on the table tab in the viewer.\n\n### BigQuery Runner: Focus on Schema Tab\n\n|ID|\n|---|\n|bigqueryRunner.focusOnSchemaTab|\n\nFocus on the schema tab in the viewer.\n\n### BigQuery Runner: Focus on Routine Tab\n\n|ID|\n|---|\n|bigqueryRunner.focusOnRoutineTab|\n\nFocus on the routine tab in the viewer.\n\n### BigQuery Runner: Focus on Job Tab\n\n|ID|\n|---|\n|bigqueryRunner.focusOnJobTab|\n\nFocus on the job tab in the viewer.\n\n### BigQuery Runner: Download as JSON Lines\n\n|ID|\n|---|\n|bigqueryRunner.downloadAsJSONL|\n\nRun the query in BigQuery and save the results to a file in JSON Lines format\n\n### BigQuery Runner: Download as JSON\n\n|ID|\n|---|\n|bigqueryRunner.downloadAsJSON|\n\nRun the query in BigQuery and save the results to a file in JSON format\n\n### BigQuery Runner: Download as CSV\n\n|ID|\n|---|\n|bigqueryRunner.downloadAsCSV|\n\nRun the query in BigQuery and save the results to a file in CSV format\n\n### BigQuery Runner: Download as Markdown\n\n|ID|\n|---|\n|bigqueryRunner.downloadAsMarkdown|\n\nRun the query in BigQuery and save the results to a file in Markdown format\n\n### BigQuery Runner: Download as Plain Text\n\n|ID|\n|---|\n|bigqueryRunner.downloadAsText|\n\nRun the query in BigQuery and save the results to a file in plain text\n\n### BigQuery Runner: Refresh Resources\n\n|ID|\n|---|\n|bigqueryRunner.refreshResources|\n\nRefresh the BigQuery Runner's Resources\n\n### BigQuery Runner: Copy Table ID\n\n|ID|\n|---|\n|bigqueryRunner.copyTableId|\n\nCopy the selected table ID to the clipboard\n\n### BigQuery Runner: Preview Table in VS Code\n\n|ID|\n|---|\n|bigqueryRunner.previewTableInVSCode|\n\nPreview the selected table in VS Code\n\n### BigQuery Runner: Preview Table on Remote\n\n|ID|\n|---|\n|bigqueryRunner.previewTableOnRemote|\n\nPreview the selected table in Google Cloud Console\n\n### BigQuery Runner: Copy Field Name\n\n|ID|\n|---|\n|bigqueryRunner.copyFieldName|\n\nCopy the selected field name to the clipboard\n\n### BigQuery Runner: Clear Parameters\n\n|ID|\n|---|\n|bigqueryRunner.clearParams|\n\nClear the stored parameters for active text editor.\n\n### BigQuery Runner: Clear All Parameters\n\n|ID|\n|---|\n|bigqueryRunner.clearAllParams|\n\nClear all stored parameters.\n\n## Configuration\n\nThe extension can be customized by modifying your `settings.json` file. The available configuration options, and their defaults, are below.\n\n### `bigqueryRunner.keyFilename`\n\n|Type|Default|\n|---|---|\n|string \u0026#x7C; null|null|\n\nThe path to the JSON file for the service account. If a relative path is specified, it is taken as a path relative to the root folder opened in VSCode. If not specified, the path specified by `GOOGLE_APPLICATION_CREDENTIALS` will be used.\n\n### `bigqueryRunner.projectId`\n\n|Type|Default|\n|---|---|\n|string \u0026#x7C; null|null|\n\nProject ID for Google Cloud Platform. If not specified, the value of `project_id` in the JSON file of the service account will be used.\n\n### `bigqueryRunner.location`\n\n|Type|Default|\n|---|---|\n|string \u0026#x7C; null|null|\n\nThe geographic location of all datasets and jobs referenced and created through this extension. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.\n\n### `bigqueryRunner.useLegacySql`\n\n|Type|Default|\n|---|---|\n|boolean|false|\n\nFlag whether to use legacy SQL. If `false`, use standard SQL.\n\n### `bigqueryRunner.maximumBytesBilled`\n\n|Type|Default|\n|---|---|\n|string \u0026#x7C; null|null|\n\nLimits the bytes billed for this query. Queries with bytes billed above this limit will fail (without incurring a charge). Can be set in units, for example `200GB`. If unspecified, the project default is used.\n\n### `bigqueryRunner.extensions`\n\n|Type|Default|\n|---|---|\n|array|[\".bqsql\",\".bqddl\",\".bqdml\"]|\n\nList of file extensions for which the query is to be validated when the file is modified.\n\n### `bigqueryRunner.languageIds`\n\n|Type|Default|\n|---|---|\n|array|[\"bigquery\",\"sql-bigquery\"]|\n\nList of [language identifiers](https://code.visualstudio.com/docs/languages/identifiers) of the files whose queries are to be validated when the files are modified.\n\n### `bigqueryRunner.icon`\n\n|Type|Default|\n|---|---|\n|boolean|true|\n\nDisplay GUI button to run on the editor title menu bar.\n\n### `bigqueryRunner.defaultDataset.datasetId`\n\n|Type|Default|\n|---|---|\n|string \u0026#x7C; null|null|\n\nSpecifies the default datasetId to assume for any unqualified table names in the query. If not set, all table names in the query string must be qualified in the format 'datasetId.tableId'.\n\n### `bigqueryRunner.defaultDataset.projectId`\n\n|Type|Default|\n|---|---|\n|string \u0026#x7C; null|null|\n\nSpecifies the default projectId to assume for any unqualified table names in the query. If `defaultDataset.datasetId` is not set, setting this value has no effect.\n\n### `bigqueryRunner.downloader.csv.delimiter`\n\n|Type|Default|\n|---|---|\n|string|\",\"|\n\nThe delimiter for CSV. For example, if set to `\\t`, the output will be formatted as TSV.\n\n### `bigqueryRunner.downloader.csv.header`\n\n|Type|Default|\n|---|---|\n|boolean|false|\n\nThe flag whether to add column names to CSV.\n\n### `bigqueryRunner.downloader.rowsPerPage`\n\n|Type|Default|\n|---|---|\n|number \u0026#x7C; null|10000|\n\nMaximum number of rows to retrieve per page for downloading. If a number is specified, attempts to fetch that number of rows; if null is specified, attempts to fetch all results. If the amount of data per row is large, the specified number of rows will not always be fetched.\n\n### `bigqueryRunner.tree.projectIds`\n\n|Type|Default|\n|---|---|\n|array|[]|\n\nArray of projects for the datasets to be displayed in the tree view. If empty, only datasets in a project that have been authenticated will be displayed in the tree view.\n\n### `bigqueryRunner.viewer.column`\n\n|Type|Default|\n|---|---|\n|string \u0026#x7C; number|\"+1\"|\n\nA string such as '+N', '-N' can be set to specify a position relative to the column where the query file is opened. Then, if you set a number greater than 1, the viewer will appear in the specified number of columns from the left. A number of -1 means the viewer will appear in the same column as the query file, and a number of -2 means the viewer will appear in the column farthest to the right.\n\n### `bigqueryRunner.previewer.rowsPerPage`\n\n|Type|Default|\n|---|---|\n|number \u0026#x7C; null|100|\n\nMaximum number of rows to retrieve per page for preview. If a number is specified, attempts to fetch that number of rows; if null is specified, attempts to fetch all results. If the amount of data per row is large, the specified number of rows will not always be fetched.\n\n### `bigqueryRunner.statusBarItem.align`\n\n|Type|Default|Enum|\n|---|---|---|\n|string \u0026#x7C; null|null|\"left\" \u0026#x7C; \"right\" \u0026#x7C; null|\n\nThe alignment of the status bar item.\n\n### `bigqueryRunner.statusBarItem.priority`\n\n|Type|Default|\n|---|---|\n|number \u0026#x7C; null|null|\n\nThe priority of status bar item. Higher value means the item should be shown more to the left.\n\n### `bigqueryRunner.validation.enabled`\n\n|Type|Default|\n|---|---|\n|boolean|true|\n\nValidate the query whenever the file set in `languageIds` or `extensions` is modified.\n\n### `bigqueryRunner.validation.debounceInterval`\n\n|Type|Default|\n|---|---|\n|number|600|\n\nDebounce interval in milliseconds to validate the query when the file is modified.\n\n### `bigqueryRunner.viewer.rowsPerPage`\n\n|Type|Default|\n|---|---|\n|number \u0026#x7C; null|100|\n\nMaximum number of rows to retrieve per page for display in the viewer. If a number is specified, attempts to fetch that number of rows; if null is specified, attempts to fetch all results. If the amount of data per row is large, the specified number of rows will not always be fetched. You can use the `bigqueryRunner.prevPage` or `bigqueryRunner.nextPage` command to perform paging.\n\n\n## Additional Settings\n\n### Keyboard shortcuts\n\n`keybindings.json`:\n\n```json:keybindings.json\n[\n  {\n    \"key\": \"cmd+enter\",\n    \"command\": \"bigqueryRunner.run\",\n    \"when\": \"resourceLangId in bigqueryRunner.languageIds || resourceExtname in bigqueryRunner.extensions\"\n  },\n  {\n    \"key\": \"space h\",\n    \"command\": \"bigqueryRunner.prevPage\",\n    \"when\": \"resourceLangId in bigqueryRunner.languageIds || resourceExtname in bigqueryRunner.extensions \u0026\u0026 vim.mode == 'Normal' || vim.mode == 'Visual' || vim.mode == 'VisualBlock' || vim.mode == 'VisualLine'\"\n  },\n  {\n    \"key\": \"space l\",\n    \"command\": \"bigqueryRunner.nextPage\",\n    \"when\": \"resourceLangId in bigqueryRunner.languageIds || resourceExtname in bigqueryRunner.extensions \u0026\u0026 vim.mode == 'Normal' || vim.mode == 'Visual' || vim.mode == 'VisualBlock' || vim.mode == 'VisualLine'\"\n  }\n]\n```\n\n### Syntax highlighting `.bqsql` files as SQL\n\n`settings.json`:\n\n```json:settings.json\n{\n  \"files.associations\": {\n    \"*.bqsql\": \"sql\"\n  }\n}\n```\n\n## More documents\n\n### Changelog\n\nIf you want to know the difference between each release, see [CHANGELOG.md](CHANGELOG.md)\n\n### Contributing\n\nWhen you create an issue, pull request, or fork see [CONTRIBUTING.md](CONTRIBUTING.md)\n\n### License\n\nApache 2.0 licensed. See the [LICENSE](LICENSE) file for details.\nThis extension is forked from [google/vscode-bigquery](https://github.com/google/vscode-bigquery).\n","funding_links":["https://github.com/sponsors/minodisk"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminodisk%2Fbigquery-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminodisk%2Fbigquery-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminodisk%2Fbigquery-runner/lists"}