Setting up a Google BigQuery account

Google's BigQuery (https://cloud.google.com/bigquery/) is a service provided by Google as part of Google Cloud Platform as a serverless enterprise data warehouse. This can be deployed in minutes and tested using a free tier. They have a data sample that we can use. Perform the following steps to set up an account:

  1. Set up the data lake access using https://cloud.google.com/bigquery/ and click on TRY BIGQUERY FREE. From here, you will be redirected to your Google account login form:

If you don't have a Google account, please create a new one for the purpose of this chapter. You're going to receive a $300.00 credit, which is valid for 12 months.

Once you are redirected to Google Cloud Platform (https://console.cloud.google.com), which is the Google Software as a Service (SaaS) ecosystem home, we can see where the BigQuery console resides:

  1. To the left side of our screen, find the BIG DATA section, under which we can see the BigQuery section. Click on BigQuery:

  1. Open https://console.cloud.google.com/bigquery?p=bigquery-public-data&d=new_york_citibike, which redirects you to a screen that should look like this:

  1. On the left-hand side, click in new_york_citibike, expanding the view so you can see citibike_trips. Click on citibike_trips:

  1. Press the QUERY TABLE option:

  1. A template of SQL query will be inserted into editor and is similar to the following query
SELECT FROM 'bigquery-public-data.new_york_citibike.citibike_trips' LIMIT 1000

Exchange the template script with the following script (you can find it at https://github.com/PacktPublishing/Hands-On-Business-Intelligence-with-Qlik-Sense/blob/master/Chapter08/01%20-%20First.sql). This script below will retrieve data aggregated for every month with start and end stations, number of trips and total duration of the trips. The resulting data will be the base for our Qlik Sense summarized app:

SELECT 
TIMESTAMP_TRUNC(starttime, month) AS trip_month
,start_station_name
,end_station_name
,sum(tripduration) AS tripduration
,count(starttime) AS trips
FROM 'bigquery-public-data.new_york.citibike_trips'
GROUP BY
TIMESTAMP_TRUNC(starttime, month)
,start_station_name
,end_station_name
limit 100
Please note the limit 100 clause, so we can test our SQL for syntax errors using the Run Query button. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset