https://github.com/tianlangstudio/bigquery_proxy
Support CORS and simplify front-end use of #bigquery
https://github.com/tianlangstudio/bigquery_proxy
actix-web async bigdata bigquery cors gcp log4rs rust
Last synced: about 2 months ago
JSON representation
Support CORS and simplify front-end use of #bigquery
- Host: GitHub
- URL: https://github.com/tianlangstudio/bigquery_proxy
- Owner: TianLangStudio
- License: apache-2.0
- Created: 2023-04-03T08:51:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T02:41:39.000Z (about 3 years ago)
- Last Synced: 2025-04-01T05:48:06.051Z (about 1 year ago)
- Topics: actix-web, async, bigdata, bigquery, cors, gcp, log4rs, rust
- Language: Rust
- Homepage:
- Size: 340 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BigQuery Proxy
- support CORS
- support execute multi query concurrence
- support set google service account key by env GCP_SA_KEY

## How to run
```bash
git clone https://github.com/TianLangStudio/bigquery_proxy
cd bigquery_proxy
```
set your Google Account Service file path in .cargo/config.toml
```toml
[env]
# set google service account file path there, you can override it by env if force set false
GCP_SA_KEY = { value = "D:\\your\\google\\service\\account\\key\\there.json", force = false }
```
run test
```bash
cargo test tests::test_bigquery_query
```
run
```bash
cargo run
```
query param e.g.
```json
{
"queryName1":"select 1 as c",
"queryName2":"SELECT count(1) as c FROM `bigquery-public-data.bls.not_exists_table`"
}
```
response json e.g.
```json
{
"queryName1": {
"data": [{"c": 1}]
},
"queryName2": {
"err": "error message something like table not_exists_table is not exists"
}
}
```
