Seria mais instrutivo aparecer a instrução para configuração do seu project_id sempre que a pessoa não passa esse campo (e ele não é encontrado em nenhuma credencial), assim como na função read_sql e demais que necessitam desse parâmetro:
BaseDosDadosException:
We are not sure which Google Cloud project should be billed.
First, you should make sure that you have a Google Cloud project.
If you don't have one, set one up following these steps:
1. Go to this link https://console.cloud.google.com/projectselector2/home/dashboard
2. Agree with Terms of Service if asked
3. Click in Create Project
4. Put a cool name in your project
5. Hit create
Copy the Project ID, (notice that it is not the Project Name)
Now, you have two options:
1. Add an argument to your function pointing to the billing project id.
Like `bd.read_table('br_ibge_pib', 'municipios', billing_project_id=<YOUR_PROJECT_ID>)`
2. You can set a project_id in the environment by running the following command in your terminal: `gcloud config set project <YOUR_PROJECT_ID>`. Bear in mind that you need `gcloud` installed.
Reproduzir
Passos para reproduzir o comportamento:
Descrição Quando não indicado um
billing_project_id
na funçãoget_table_size
o erro que aparece é:Seria mais instrutivo aparecer a instrução para configuração do seu
project_id
sempre que a pessoa não passa esse campo (e ele não é encontrado em nenhuma credencial), assim como na funçãoread_sql
e demais que necessitam desse parâmetro:Reproduzir Passos para reproduzir o comportamento: