BigQuery can read data from Google Spreadsheets. Google Spreadsheets can read data from arbitrary sources — like Google Finance — and keep it updated. Hence BigQuery can read data from Google Finance and keep it updated with a simple setup.

Credits: I adapted this trick from a Tableau tip from @HighVizAbility. See his post for detailed instructions. Thanks Jeffrey for the tip— and thanks @vambenepe for forwarding it.

How-to

1. Have a Google Spreadsheet that reads from Google Finance

Copy my Google sheet.

Replace cell A2 with any stock ticker you’d like to have available in BigQuery.

Share your sheet as public (or only with the people that should see this data — the Google permissions system works).

2. Connect the spreadsheet to Google BigQuery

Import your sheet into BigQuery (federated sources docs).

3. Query

SELECT *

FROM [fh-bigquery:public_dump.goog]

Bonus: Correlate stock prices to Wikipedia pageviews

More?

Want more stories? Check my medium, follow me on twitter, and subscribe to reddit.com/r/bigquery. And try BigQuery — every month you get a full terabyte of analysis for free.