Python BigQuery allowLargeResults with pandas.io.gbq

后端 未结 3 1516
死守一世寂寞
死守一世寂寞 2021-01-04 14:00

I want to use the Pandas library to read BigQuery data. How do I allow large results?
For non-Pandas BigQuery interactions, this can be achieved like this.

Curr

3条回答
  •  忘掉有多难
    2021-01-04 14:47

    You can do it by changing the default dialect from legacy to standard in pd.read_gbq function.

    pd.read_gbq(query, 'my-super-project', dialect='standard')
    

    Indeed, you can read in Big Query documentation for the parameter AllowLargeResults:

    AllowLargeResults: For standard SQL queries, this flag is ignored and large results are always allowed.

提交回复
热议问题