Skip to main content

Refresh BigQuery data in Sheets using Apps Script and Macros

Recently the BigQuery data connector was released to enable clients to effectively import information from bigger datasets into Sheets. Presently, you can utilize devices like Apps Script and the large macro recorder to plan automatic updates inside Sheets to the associated BigQuery data.

Reasons to use it

Remain over the best in class information crucial to your business via automatically refreshing the BigQuery information in your sheet.

For instance, you can set sales data to automatically refresh with the goal that it's prepared for analysis toward the start of every day. You can likewise auto-refresh information in preparation of key meetings or introductions that happen on a weekly or monthly basis. Or on the other hand you could set a trigger to auto-refresh your information each time you open the spreadsheet.
This feature will be ON by default.

When you compare data in Sheets and BigQuery, the following procedure should be adopted.

To compare data, you might need to change the data type. For example, if a column is string data in BigQuery, then it must be plain text in Sheets to be compared correctly.If the data type in the spreadsheet and BigQuery are different, you can:

  • Change how the data is formatted in Sheets. For example, data formatted as number could be changed to plain text.
  • Cast the value in a query. For example: WHERE zip_code = CAST(@ZIP AS string) 

Please note

  • When you run a query, your spreadsheet permissions are used, not the spreadsheet owner’s.
  • You can pull up to 10,000 rows per query from BigQuery.
  • You can scan up to 1 TB of data in a single query in Sheets.
  • Data that you pull from BigQuery is read-only.
  • Only standard SQL is supported by BigQuery. 
Record a macro to refresh your data
  • On your computer, open a spreadsheet that contains data connected to BigQuery in Google Sheet.
  • Record a macro from a different tab then the one you want to refresh. 
  • After you start recording, switch to the tab you want to refresh. 
  • At the bottom left, click Refresh.
  • Click Save

Schedule your macro

  • At the top, click Tools > Script editor.
  • At the top, click Edit > Current project’s triggers.
  • At the bottom right, click Add trigger and select your options.
  • Click Save.


Popular posts from this blog

People are going wild for a handy new shortcut that will change the way you use Google Docs

- Google has introduced new URLs that can open up blank Google Docs with the click of a button. - To try it out, simply point your browser to  or other Google URLs. - Here's an incomplete list of these new URLs, along with a way to take the shortcut to the next level. Last month, Google rolled out a new time-saving shortcut for anyone who spends a lot of time in Google Docs. To open a new, blank document — or spreadsheet, or presentation — all you have to do is go to one of Google's handy new URLs. So if you want to start a new document, you just have to type " " into your browser. Google Docs ✔ @googledocs Introducing a .new time-saving trick for users. Type any of these .new domains to instantly create Docs, Sheets, Slides, Sites or Forms ↓ 9:35 PM - Oct 25, 2018 4,550 2,812 people are talking about this Twitter Ads info and privacy Here&#

Set start times and import reminders in Tasks

Here comes one of the most awaited features. Tasks is one of the goals to follow what you have to do in G Suite. These new updates will help ensure the majority of your to-dos are in Tasks, and guarantee that you can monitor the due dates related with them. Moreover, importing reminders to Tasks can support your users if your association is at present changing from Inbox to Gmail. Set a date and time for your tasks and receive notifications - You’ll find a place to add date & time. Create repeating tasks - Also you can make an event recur. Import reminders into Tasks This import tool will pull your reminders (from Inbox/Gmail, Calendar, or the Assistant) into Tasks.When importing reminders into Tasks, we’ll copy over the title, date, time and recurrence of the reminder. Please note, reminders with locations associated will not be imported. Additionally, this is a one-time import and not a constant sync. - When you open Tasks on the web or your mobile app, you’ll se

Use Vault for Gmail Confidential Messages and Jamboard Files

Google vault will be supporting two new formats in the future, Gmail confidential mode emails & Jamboard files stored in Google Drive. Google Vault gives you a chance to retain, hold, search, and export data to support your organization’s retention and eDiscovery needs. This dispatch includes support for new information types with the goal that you can thoroughly oversee your association's information. What happens when individuals in your association sends confidential messages? Vault can hold, retain, search, and export all confidential mode messages sent by users in your association. Messages are constantly accessible to Vault, notwithstanding when the sender sets a termination date or denies access to private messages. Here’s an example of what will see in Vault when they search for and preview this email sent by . But It’ll not work vise versa. Admins can hold, retain, search and export message headers and s