https://github.com/wintermi/bq2csv
A command line application designed to provide a simple method to execute a BigQuery SQL script from "stdin", outputting all results to "stdout" in CSV format. A detailed log is output to the console "stderr" providing you with the available execution statistics.
https://github.com/wintermi/bq2csv
bigquery google-cloud google-cloud-platform
Last synced: 10 days ago
JSON representation
A command line application designed to provide a simple method to execute a BigQuery SQL script from "stdin", outputting all results to "stdout" in CSV format. A detailed log is output to the console "stderr" providing you with the available execution statistics.
- Host: GitHub
- URL: https://github.com/wintermi/bq2csv
- Owner: wintermi
- License: apache-2.0
- Created: 2022-08-23T07:02:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-01T12:54:20.000Z (9 months ago)
- Last Synced: 2025-02-07T19:15:02.553Z (9 months ago)
- Topics: bigquery, google-cloud, google-cloud-platform
- Language: Go
- Homepage:
- Size: 256 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BigQuery 2 CSV
[](https://github.com/wintermi/bq2csv/actions)
[](https://goreportcard.com/report/github.com/wintermi/bq2csv)
[](https://github.com/wintermi/bq2csv/blob/main/LICENSE)
[](https://github.com/wintermi/bq2csv/releases)
## Description
A command line application designed to provide a simple method to execute a BigQuery SQL script from "stdin", outputting all results to "stdout" in CSV format. A detailed log is output to the console "stderr" providing you with the available execution statistics.
```
USAGE:
bq2csv -p PROJECT_ID -d DATASET
ARGS:
-c Disable Query Cache
-d string
BigQuery Dataset (Required)
-dr
Dry Run
-f string
Field Delimter (default ",")
-l string
BigQuery Data Processing Location
-p string
Google Cloud Project ID (Required)
-v Output Verbose Detail
```
## Example
```
echo "SELECT 1" | bq2csv -p PROJECT_ID -d DATASET 1> results.csv
```
## License
**bq2csv** is released under the [Apache License 2.0](https://github.com/wintermi/bq2csv/blob/main/LICENSE) unless explicitly mentioned in the file header.