Set your Google BigQuery Service Account, project, and data table permissions to be able to connect to your Anaplan model.
Note: CloudWorks™ doesn't support BigQuery Views or Anaplan Dynamic Cell Access.
To create a table in BigQuery, see the Google documentation:
![BigQueary service accopunt with dialog and BigQuery Editor displayed.](https://assets-us-01.kc-usercontent.com:443/cddce937-cf5a-003a-bfad-78b8fc29ea3f/196a1964-1055-4b23-bc8b-b4102bf4dd06/Service-Act-Permissions.png)
To set permissions in the BigQuery console:
- Select SQL workspaces.
- Select Service Account.
- Copy the e-mail of the service account to use as your ID (the account you used to generate the service account key).
- Select SHARE DATASET from the ribbon menu, to the right of your project name.
From the DATASET PERMISSIONS dialog:
- Select your Service Account again.
- Select BigQuery Data Editor. The enables an export from BigQuery.
- Select Done.
This enables access to edit all the contents of datasets in the Service Account.
![Dataset permission dropdown in the BigQuery console with Dataset Editor selected.](https://assets-us-01.kc-usercontent.com:443/cddce937-cf5a-003a-bfad-78b8fc29ea3f/d7538963-f026-4ce8-b04c-8089b1b7da00/DatasetPermissions.png)
At the dataset level, also select BigQuery Data Editor.
![Dataset permission dropdown in the BigQuery console with Dataset Editor selected.](https://assets-us-01.kc-usercontent.com:443/cddce937-cf5a-003a-bfad-78b8fc29ea3f/d7538963-f026-4ce8-b04c-8089b1b7da00/DatasetPermissions.png)
This enables access to this dataset.
- For Step #3 above, you can also copy the Service account key from the .json file from your account setup. You need the email to add members and assign them roles.
- The role BigQuery Data Viewer does not enable export.
- Consider your company's data access roles as you make these assignments.
- At the project level you need the permissions
bigquery.jobuser
andbigquery.user
- Optionally, you may want to create an error message table.
Run this script in your BigQuery dataset:
CREATE TABLE `<your project>.<your dataset>.cloudworks_errors`
(
integration_id STRING,
run_id STRING,
run_date TIMESTAMP,
error_code INT64,
error_message STRING,
failed_row STRING
)
OPTIONS(
description=""
);
Service Account JSON example, with account email:
![A Google Service Account .json example with an associated email.](https://assets-us-01.kc-usercontent.com:443/cddce937-cf5a-003a-bfad-78b8fc29ea3f/2904a732-4732-4097-b114-1a8b8df6ca81/json-with-email.png)