-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigQuery: The sample to create a BigQuery table is not working #8703
Comments
I believe this has been fixed since 1.10.0 by having a string check in Table.init(). |
@ryanyuan is correct: the |
Still having the same issue on v1.26.1 |
@philippabaliman No issue for me with google-cloud-bigquery==1.26.1. Can you post your stacktrace here? |
check if when you assign a variables like table name, it is an actual string type.
notice the accidental comma at the end. That would make the variable to be tuple type instead of string. |
This is still an issue, unfortunately. Here is the code that is causing the issue, but with changes to it that I believe fix it, at least in my case. Could someone please take a look at the code and consider this approach as a fix? Without a solution to this issue loading schema files through bigquery.Table will not work with RECORD. I'm not entirely sure about STRUCT, but I assume that would be screened at QA. Thanks... ( from lib/python3.8/site-packages/google/cloud/bigquery/schema.py ) def to_api_repr(self) -> dict:
|
Specify the API at the beginning of the title (for example, "BigQuery: ...")
General, Core, and Other are also allowed as types
This sample to be exact: https://github.com/googleapis/google-cloud-python/blob/7ba0220ff9d0d68241baa863b3152c34dc9f7a1a/bigquery/samples/create_table.py
OS type and version
MacOS Mojave
Python version and virtual environment information:
python --version
Both 2.7.10 and 3.7
google-cloud- version:
pip show google-<service>
orpip freeze
google-cloud-bigquery==1.9.0
Steps to reproduce
Code example
Stack trace
(the line that throws this exception is bigquery.Table(.....))
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: