Search code examples
google-bigquerypybigquery

Why "module 'google.cloud.bigquery' has no attribute 'format_options'"?


I use bigquery fine in my code, but when I try to run this:

parquet_options = bigquery.format_options.ParquetOptions()

there is an exception:

AttributeError("module 'google.cloud.bigquery' has no attribute 'format_options'")

https://cloud.google.com/python/docs/reference/bigquery/latest/format_options


Solution

  • The Issue can be resolved by upgrading the gapic-generator and google-cloud-bigquery module. Can you try the below command:

    pip3 install --upgrade gapic-generator 
    
    pip3  install –upgrade google-cloud-bigquery
    

    For more information you can refer to these link1 and link2