Book Image

Google Cloud Platform for Architects

By : Vitthal Srinivasan, Loonycorn , Judy Raj
Book Image

Google Cloud Platform for Architects

By: Vitthal Srinivasan, Loonycorn , Judy Raj

Overview of this book

Using a public cloud platform was considered risky a decade ago, and unconventional even just a few years ago. Today, however, use of the public cloud is completely mainstream - the norm, rather than the exception. Several leading technology firms, including Google, have built sophisticated cloud platforms, and are locked in a fierce competition for market share. The main goal of this book is to enable you to get the best out of the GCP, and to use it with confidence and competence. You will learn why cloud architectures take the forms that they do, and this will help you become a skilled high-level cloud architect. You will also learn how individual cloud services are configured and used, so that you are never intimidated at having to build it yourself. You will also learn the right way and the right situation in which to use the important GCP services. By the end of this book, you will be able to make the most out of Google Cloud Platform design.
Table of Contents (19 chapters)
13
Logging and Monitoring

Analyzing financial time series with BigQuery

Here we will run a time-series analysis on a public dataset called gbpusd which is a curated time series made publicly available with historical data on the exchange rate between the British Pound (GBP) and the US Dollar (USD).

  1. Make a dataset called timeseries using following command on Cloud Shell
bq mk timeseries
  1. Load gbpusd dataset with following command:
bq load timeseries.gbpusd_0114 gs://solutions-public-assets/time-series-master/GBPUSD_2014_01.csv /                            venue:STRING,
currencies:STRING,
time:TIMESTAMP,
bid:FLOAT,
ask:FLOAT
  1. Now, run following query:
SELECT FORMAT_UTC_USEC(time) AS time, venue, currencies, time, bid, ask
FROM timeseries.gbpusd_0114
ORDER BY time ASC
LIMIT 1000;
  1. Download the query results as CSV file
  2. Open Google Sheets. Import the downloaded CSV file by clicking on File | Import
  3. When prompted...