Export Google BigQuery Query Result As A DataFrame Using BigQuery API In Python

preview_player
Показать описание

There are a couple reasons why you may want to export a query output as a dataframe object. First, you can perform additional analysis and transformation, which is going to be pretty cumbersome to do in SQL. Second, if you want to export a resultset to different file format, we can do that easily with a dataframe.

► Buy Me a Coffee? Your support is much appreciated!
-------------------------------------------------------------------------------------------
☕ Venmo: @Jie-Jenn

► Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------

#GoogleBigQuery #BigQuery #GoogleCloud
Рекомендации по теме
Комментарии
Автор

Hi, as a reference, if you encounter a missing dependencies error executing the following line: "query_job.to_dataframe()", please make sure you have pandas an db-types installed.

IrvingDev-vc
Автор

my data is pretty big, I cant load all of them at once, is there a way to load the data from BigQuery fast to my local machine so that I can do Python analysis

pitySummer
Автор

Hi Jie.. This is very useful.. I have a scenario, how can I load ddl statements into bigquery table using python pandas df with sno generated in sequential manner?

raghavstreehouse
Автор

aside from printing that the job has not finished yet (something you don't do here) I don't understand why sleeping for 3 sec, you don't have to reload every 3 sec to finally get your results

omarfessi