Google Spreadsheet

Google Spreadsheet

You can create a dataset using the data stored in your Google Spreadsheet. This feature is especially useful when you have huge volumes of data online. With this feature, you are not required to download the data. Rubiscape can directly connect to the Spreadsheet on your drive and create a dataset using the data in it.
Before you can use Google spreadsheet to create your dataset in Rubiscape, you need to create Google Service Account and give the access to your spreadsheet (share your spreadsheet) with this Service Account.
The prerequisites to create Google Spreadsheet are:

  • Creating a project
  • Enabling access to Google sheets and Google Drive to the newly created project.
  • Creating your service account
  • Creating a private key for your service account
  • Giving access to the Google Spreadsheet to your Service account

Completing the prerequisites for Google Spreadsheet

Follow the steps given below to give access to your Google Service Account.

  1. Create a Project. Refer to Creating a Project.
  2. Enable access to Google Sheets and Google Drive to the newly created project. Refer to Enabling Access to Google Sheets and Google Drive.
  3. Create Service Account. Refer to Adding Credentials to Service Account.
  4. Create a Private Key for your service account which can be used to give access. Creating Private Key for Service Account.
  5. Give access to the Google Spreadsheet to your Service account. Refer to Giving Access to the Service Account.
    After completing these steps, your Google Spreadsheet can be accessed through Rubiscape to create dataset.

    The further sections explain the steps for each of these prerequisites.

Creating a Project

  1. To create a project, visit Developer's console
    https://console.developers.google.com/.
    A list of available projects is displayed. You can select from the list or create a new project. In this case we are creating a new project. If want to use an existing project, skip the further steps and go to Enabling Access to Google Sheets and Google Drive.
    In this example, we are creating a new project.
  2. Click CREATE PROJECT.

  3. New Project page is displayed.
  4. A default Project name is displayed. It is a unique identifier and recommended not to be changed.
  5. From the drop-down, select the Organisation.
  6. Add Location.
  7. Click CREATE.



    The project is created and you are redirected to the Dashboard page.

Enabling Access to Google Sheets and Google Drive

To enable a project's access to Google Sheets and Google Drive, follow the steps given below.

  1. From the list of projects, locate your project and click SELECT PROJECT.



    The Dashboard with Project info is displayed.
  2. Click Go to APIs overview.



    The APIs & Services page is displayed.
  3. Click ENABLE APIS & SERVICES.



    The API Library page is displayed.
  4. Click Google Sheets API and Google Drive API. You can use the search box to locate APIs.
  5. Navigate back to the dashboard page and verify that the APIs are added.



Adding Credentials to Service Account

  1. To add credentials, click Credentials from the left menu.
    Credentials page is displayed.
  2. Click CREATE CREDENTIALS.



  3. Out of the options displayed, select Service account.



  4. Create Service Account page is displayed.



  5. Enter Service account name.
  6. Enter Service account ID.
  7. Enter Service account description.
  8. Click CREATE.



  9. Next, Grant this service account access to the project. Click Role and select the desired role and click Continue. This step is optional.
  10. Next, Grant users access to this service account. This step is optional.
  11. After everything is done, click DONE.
    The Service Account is created and is added to the Service Accounts list.



Creating Private Key for Service Account

  1. On the Credentials page, click Manage service accounts.



    Service accounts page is displayed.
  2. Locate the newly created service account, click ellipsis corresponding to it, and click Create key.



    The Create private key dialog box is displayed.
  3. Select the Key type as JSON.
  4. Click CREATE.



    The Json file containing the key is downloaded to the default download location of your computer.
    This file contains the keys that are required to use the Google sheets by other applications (in this case Rubiscape).

Giving Access to the Service Account

After creating Service account and creating a private key, the next step is to give the access to your Google spreadsheet to the created service account.
To give access to your spreadsheet to the service account, follow the steps given below.

  1. Visit your Google Drive.
  2. Locate the Spreadsheet whose access you want to give to your service account.
  3. Click Share.



  4. Open the Json file downloaded during Creating Private Key for Service Account in a text editor.
  5. Copy the client_email.



  6. Paste this client_email in the share field. You can optionally add a notification message.
  7. Click Done.



    A message to confirm the action is displayed.
  8. Click Share Anyway.
    The Spreadsheet is shared with the service account. To confirm that, again click the Share. The Share page contains name of the service account as shown below.



    The spreadsheet can now be accessed from the Rubiscape application.
    Next step is to create dataset using this Google Sheet. Refer to Creating Dataset using Google Sheet.

Creating Dataset using Google Sheet

To create a Google Spreadsheet dataset, make sure you have completed the prerequisites for Google Spreadsheet.
After that, follow the steps given below.

  1. On the home page, click Create icon ().
    Product Selection page is displayed.
  2. Hover over the dataset tile, and click Create Dataset.



    Dataset Selection page is displayed.
  3. From the API option, select Google Spreadsheet.



    Create Google Spreadsheet Dataset page is displayed.
  4. Enter Name for the dataset.
  5. Enter Description for the dataset.
  6. Enter Google spreadsheet file name. This is the same spreadsheet to which access was given to the service account. Refer to Giving Access to the Service Account.
  7. To upload the JSON file containing the private key, click Browse. This is the same JSON that was downloaded while Creating Private Key for Service Account. Select the JSON file and click ok.
  8. To fetch the results, Click Fetch.



    The Features list is populated. Configure the features as required. Refer to Configuring Feature Type.
  9. Click Create.

    The Google Spreadsheet dataset is created in your workspace and is available for use.
    • Related Articles

    • Google News

      You can create a dataset using the Google News API. Rubiscape fetches data from websites using Google News API based on the search string and time interval provided by you. To create a Google News dataset, follow the steps given below. On the home ...
    • Google Big Query

      Google Big Query is a serverless architecture. It lets you query huge amounts of data and provides desired results in seconds. It helps you to manage and analyse your data with built-in features. Prerequisites for a Google Big Query are: Google Cloud ...
    • Datasets

      A dataset is a compilation or collection of data, usually in tabular form. However, non-tabular datasets can also be compiled, as in the case of an XML file, where data appears in the form of marked-up strings of characters. In the case of Datasets, ...
    • Features of AutoML Wizard

      The Auto ML Wizard recommends the best fit model for a selected dataset, This recommendation is especially helpful if you do not know which algorithm to use for the selected dataset. Features: Auto-creation of a workbook Import, search or choose a ...
    • Refreshing Metadata of Dataset

      Rubiscape supports the Metadata Refresh feature for datasets, as listed below. Google Spreadsheet dataset RDBMS dataset File type dataset from AWS S3 cloud storage Applicable to all flat files (Excel, CSV, JSON, Text) This feature is available in ...