'NoneType' object has no attribute 'array' with Pandas and Bigquery

Viewed 582

I want to fetch some Bigquery data to a pandas dataframe.

My code is really simple:

from google.cloud import bigquery
bq_client = bigquery.Client(project=GCP_PROJECT_NAME)
sql_query = """
select ...
"""

job = self.bq_client.query(sql_query).result()
df = job.to_dataframe()

But I have an error on the last line (df = job.to_dataframe()):

df = job.to_dataframe()
venv/lib/python3.8/site-packages/google/cloud/bigquery/_pandas_helpers.py:244: UserWarning: Unable to determine type for field 'customer_email'.
  warnings.warn("Unable to determine type for field '{}'.".format(bq_field.name))
*** AttributeError: 'NoneType' object has no attribute 'array'

Any ideas what can be the issue ?

0 Answers
Related