On April 5, MAGELLAN BLOCKS (https://www.magellanic-clouds.com/blocks/ referred hereafter as BLOCKS) was released. BLOCKS is a service that allows even non-programmers to easily take advantage of the Google Cloud Platform (GCP) through the intuitive manipulation of on-screen BLOCKs.
However, in order to use BLOCKS in its current condition, there are things we’ll need to first understand about GCP, and things we’ll need to prepare there, as well. I’ll explain those as simply as I can in today’s post. In Part 2 of this series, I’ll explain about GCP’s BigQuery service, and then demonstrate how to actually use a BigQuery BLOCK within BLOCKS in Part 3. I hope this series will help you gain a deeper understanding of GCP, MAGELLAN BLOCKS, and how both can work together.
What is the Google Cloud Platform?
GCP (https://cloud.google.com/) is the general term for the cloud services that Google offers. There are a variety of services within GCP for users to take advantage of, allowing anyone access to the core of Google’s powerful technology. Some examples of these powerful services include virtual machines, Big Data processing, Machine Learning, Vision API, and more.
GCP services available for use in MAGELLAN BLOCKS
While there are many services in GCP, only BigQuery (https://cloud.google.com/bigquery/what-is-bigquery) is usable simply and free of charge in this first release of BLOCKS. We’re planning and developing BLOCKS for accessing several other services over the course of future builds, so please look forward to those.
BigQuery is a Big Data analysis platform that can process vast amounts of data at high-speed. To use BigQuery, users write queries in syntax close to standard SQL.
Using BigQuery in MAGELLAN BLOCKS
Outline of steps
Using BigQuery in BLOCKS involves the following:
- Acquiring a GCP account and creating a GCP project.
- Acquiring your GCP service account authentication information.
- Registering your GCP project into BLOCKS.
- Placing BigQuery BLOCKS into the editor and configuring them.
I’ll go into details about each of these steps below.
Please note that the process described in this blog post was performed using the Google Chrome web browser. A JSON format file will need to be downloaded at one point, which is not possible on the Safari web browser. As such, use of Google Chrome is recommended for following along with this tutorial.
Acquiring a GCP account and creating a project
First, let’s register a GCP account. On the GCP main page (https://cloud.google.com/), log in using the Google account of your choice.
Once you’ve logged in, click the "Create project" button.
Enter the project name of your choice. We’ve gone with magellan-block-bigquery for the purposes of this demonstration.
We’ve now finished signing up and should be at the dashboard screen. Confirm your project ID, as we’ll need that for registering your GCP project into BLOCKS.
Acquiring your GCP service account authentication information
Let’s get the GCP service account information we’ll need to connect your project to BLOCKS. Choose “Use Google APIs” from the dashboard.
Click “Credentials” and then “Create credentials”.
Choose “Service account key”.
Create a service account key. We’ve chosen “magellan-blocks-bigquery-demo” for our account name.
When you click the “Create” button, a JSON format file will start downloading. Please save this file as we will need to use it when connecting BLOCKS to your GCP account. Keep in mind that the JSON key file download will not work on the Safari web browser.
Registering your GCP project into BLOCKS
Now we’ll get things set up in MAGELLAN BLOCKS for using BigQuery. Open up the BLOCKS editor and load up a Board. We’ve named our Board, “demo-bigquery”.
In order to use BigQuery, we’ll first need to adjust the “GCP service accounts” setting. Click the “Board settings” button at the top-right of the Board editor.
From the Board settings menu, select "GCP service accounts" from the list on the left.
Click the “Add” button, then input the “Project ID” and upload the service key JSON file we acquired earlier. Then, click the “Add” button.
If you get results like the screen below, then you’ve successfully connected your GCP account to BLOCKS.
Placing BigQuery BLOCKS into the editor and using them
Well, we’ve come to the point of actually putting a BigQuery BLOCK onto our Board! Next time, in Part 2, we’ll discuss some of the basics of the BigQuery service. Then, in Part 3, we’ll actually use the BigQuery BLOCK in MAGELLAN BLOCKS.
Images and corresponding text were updated to reflect current versions of the Google Developers Console and MAGELLAN BLOCKS.