I'm following this instruction to write a python code and connect it to bigquery
by using
gcloud init
I choose a particular account and project
and then I run this code:
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()
But it seems it connects to a wrong project. How it is possible? Does any one have any experience? this is the error.
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)
The project that I bolded belongs to my another account.