将 bigquery 连接到一个意外的项目
connecting bigquery to an unintended project
我正在跟随 this instruction 编写 python 代码并将其连接到 bigquery
通过使用
gcloud init
我选择一个特定的账户和项目
然后我 运行 这个代码:
from gcloud import bigquery
from gcloud.bigquery import job
from gcloud.bigquery.table import *
# Create a new Google BigQuery client using Google Cloud Platform project
# defaults.
bq = bigquery.Client()
但它似乎连接到一个错误的项目。怎么可能?有没有人有任何经验?这是错误。
Traceback (most recent call last): File "", line 1, in
File
"C:\Python36-32\lib\site-packages\gcloud\bigquery\dataset.py", line
423, in create
method='POST', path=path, data=self._build_resource()) File "C:\Python36-32\lib\site-packages\gcloud\connection.py", line 347, in
api_request
error_info=method + ' ' + url) gcloud.exceptions.Forbidden: 403 Billing has not been enabled for this project. Enable billing at
https://console.cloud.google.com/billing. (POST
https://www.googleapis.com/bigquery/v2/projects/decisive-octane-142800/datasets)
我加粗的项目属于我的另一个帐户。
我正在跟随 this instruction 编写 python 代码并将其连接到 bigquery
通过使用
gcloud init
我选择一个特定的账户和项目
然后我 运行 这个代码:
from gcloud import bigquery
from gcloud.bigquery import job
from gcloud.bigquery.table import *
# Create a new Google BigQuery client using Google Cloud Platform project
# defaults.
bq = bigquery.Client()
但它似乎连接到一个错误的项目。怎么可能?有没有人有任何经验?这是错误。
Traceback (most recent call last): File "", line 1, in File "C:\Python36-32\lib\site-packages\gcloud\bigquery\dataset.py", line 423, in create method='POST', path=path, data=self._build_resource()) File "C:\Python36-32\lib\site-packages\gcloud\connection.py", line 347, in api_request error_info=method + ' ' + url) gcloud.exceptions.Forbidden: 403 Billing has not been enabled for this project. Enable billing at https://console.cloud.google.com/billing. (POST https://www.googleapis.com/bigquery/v2/projects/decisive-octane-142800/datasets)
我加粗的项目属于我的另一个帐户。