Using a Credentials Profile for Automation Services and Scheduled Updates with Google BigQuery Data


Preparations

Before you begin, you must have set up a service account at Google.

What is a credentials profile?

Sometimes you do not want end users of your analysis to have to sign in to Google when they open the analysis. For example, this is the case if you want to use Automation Services or Scheduled Updates.

To enable this type of automatic authentication in connections to Google BigQuery, you can set up a credentials profile with the credentials of a Google service account.

A credentials profile is a way of storing credentials for connecting to an external data source, without storing the credentials in the analysis itself. The credentials profile has a name, and contains a username and a password.

 

Creating a credentials profile for Google BigQuery

  1. Use the following template to create a new credentials profile with your Google BigQuery service account credentials.

    <entry profile="my_credentials_profile">
     <allowed-usages>
       <entry connector-id="Spotfire.GoogleBigQueryAdapter" />
     </allowed-usages>
     <username>myserviceaccount@example.com</username>
     <password>{My service account key}</password>
    </entry>

  2. Note: The password is the entire service account key, including the curly brackets { }. See the example below.

  3. In the template above, enter the following information:

    1. For the attribute profile, specify a name for the credentials profile.

    2. For the element username, specify the email address of the service account.

    3. For the element password, paste the private/public key for your service account.

  4. Add your credentials profile to your Automation Services and/or Web Player services. For instructions, see Credentials profiles for connectors.

Example credentials profile
<entry profile="my_google_credentials_profile">
   <allowed-usages>
      <entry connector-id="Spotfire.GoogleBigQueryAdapter" />
   </allowed-usages>
   <username>some-service-account@some-project-id.iam.gserviceaccount.com</username>
   <password>{"type":"service_account","project_id":"project-id","private_key_id":"123","private_key":"-----BEGIN PRIVATE KEY----- some-key -----END PRIVATE KEY----- ","client_email":"some-service-account@project-id.iam.gserviceaccount.com","client_id":"123","auth_uri":"..."}</password>
</entry>

Specifying the credentials profile to use for an analysis

Prerequisite: To use a credentials profile for authentication in a Spotfire web client or Automation Services, you must set the authentication mode for the connector on the web player service to WebConfig. See the Spotfire Server and Environment Installation and Administration manual for more information about authentication modes.

When you have created a credentials profile with your service account credentials, you can use it for automatic authentication in your analyses of BigQuery data.

  1. In an analysis file with a connection to Google BigQuery, select Data > Data connection properties on the menu bar.

  2. In the Data Connection Properties dialog, click to select your Google BigQuery connection, and then click Settingsā€¦.

  3. In the Data Connection Settings dialog, on the Data source tab, click Settingsā€¦.

  4. In the Data Source Settings dialog, on the Credentials tab, select No, but save my credentials profile.

  5. In the text field, enter the name of the credentials profile you want to use.

  6. To save your changes, click OK to close the dialog boxes.

See also:

Accessing Data from Google BigQuery

Google BigQuery Data Types

Supported Functions - Google BigQuery

Repeated Columns from Google BigQuery

Enabling Google BigQuery in Spotfire web clients