TianLangStudio / bigquery_proxy

Support CORS and simplify front-end use of #bigquery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BigQuery Proxy

  • support CORS
  • support execute multi query concurrence
  • support set google service account key by env GCP_SA_KEY
    set env GCP_SA_KEY

How to run

    git clone https://github.com/TianLangStudio/bigquery_proxy
    cd bigquery_proxy  

set your Google Account Service file path in .cargo/config.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

cargo test tests::test_bigquery_query 

run

cargo run

query param e.g.

  {
     "queryName1":"select 1 as c",
     "queryName2":"SELECT count(1) as c FROM `bigquery-public-data.bls.not_exists_table`"
  }

response json e.g.

 {
  "queryName1": {
    "data": [{"c": 1}]
  },
  "queryName2": {
    "err": "error message something like table not_exists_table is not exists"
  }
}

run test screen shot

About

Support CORS and simplify front-end use of #bigquery

License:Apache License 2.0


Languages

Language:Rust 100.0%