Life Hack for Big Data Analysts!

Set up:

The set up of this lab is a little different from the other labs of Qwiklabs. In other labs you use the Google Cloud Console, but in this lab you will use the script.google.com for creating a new project. Just ensure that you are not using your personal GCP account or pre-created project for this lab.

Introduction:

All through this lab you will be using App script along with queries. In this introduction section you will be briefed about the Google Apps Script and the use of it. Here is what all you can do with Apps script

Query BigQuery and log results to Sheet

With this task, you will be completing most of the lab. The instructions of this lab are self explanatory with screenshots. All you have to do is understand the different functions which you are executing and also the output of these queries.

Create a new Apps Script project

The first subtask of this section is to create a new Apps Script project. You will be working with this project the rest of the lab. Follow the instructions as given and you will easily be able to create a project to work with in this lab.

Enable the BigQuery advanced service

We need to enable big query in apps script in order to run the queries and create our dataset. The instructions are perfectly provided in the lab and you will find no difficulties while enabling Big Query. Refer to the screenshots in case you are finding any difficulties.

Enter and run your application code

Now you are all set to start scripting. Copy the given code and paste it in the code editor. Save the file and rename the file as given in the lab instructions. It is very important to study the different queries which you are running in this lab. In this code, you will be creating a data set in the form of a G-sheet which you will later convert into a slide presentation.

Test the Query in Big Query

As we are using SQL in AppScript to get the dataset it will be helpful to make sure that the query which we have fired is right. The lab manual explains how to verify the query. Good to know — you can use this practice for all the SQL queries which you will be running in AppScript.

Create a chart in Google Sheets

Now you create a chart in Google Sheets. In this section you have to look at the different scripts which you will be running carefully. What will happen here is that runQuery will communicate with BigQuery, and will send the results into a Sheet.

Put the results data into a slide deck

Almost done! In this final step you will be making a slide deck in which all the data in the sheet will be presented accordingly (remember the pretty pictures?). Here are the steps which you will be following in order to complete this lab and get your slide deck ready

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store