Skip to main content

Google Data Studio Manage Google Data Studio assets

Operations on Google Data Studio assets (connections, data sources, reports).

In general, these should be:

  • Created in top-down order (connection, then data sources and reports)
  • Deleted in bottom-up order (data sources and reports, then connections)1

Asset structure

Connection

A Google Data Studio connection requires a name and qualifiedName. For creation, specific settings are also required to distinguish it as a Google Data Studio connection rather than another type of connection. In addition, at least one of adminRoles, adminGroups, or adminUsers must be provided.

Create a Google Data Studio connection
String adminRoleGuid = client.getRoleCache().getIdForName("$admin"); // (1)
Connection connection = Connection.creator( // (2)
"gds-connection", // (3)
AtlanConnectorType.DATASTUDIO, // (4)
List.of(adminRoleGuid), // (5)
List.of("group2"), // (6)
List.of("jsmith")) // (7)
.build();
AssetMutationResponse response = connection.save(client); // (8)
String connectionQualifiedName = response.getCreatedAssets().get(0).getQualifiedName(); // (9)
  1. Retrieve the GUID for the admin role, to use later for defining the roles that can administer the connection.
  2. Build up the minimum request to create a connection.
  3. Provide a human-readable name for your connection, such as production or development.
  4. Set the type of connection to Google Data Studio.
  5. List the workspace roles that should be able to administer the connection (or null if none). All users with that workspace role (current and future) will be administrators of the connection. Note that the values here need to be the GUIDs of the workspace roles. At least one of adminRoles, adminGroups, or adminUsers must be provided.
  6. List the group names that can administer this connection (or null if none). All users within that group (current and future) will be administrators of the connection. Note that the values here are the names of the groups. At least one of adminRoles, adminGroups, or adminUsers must be provided.
  7. List the user names that can administer this connection (or null if none). Note that the values here are the usernames of the users. At least one of adminRoles, adminGroups, or adminUsers must be provided.
  8. Actually call Atlan to create the connection. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
  9. Retrieve the qualifiedName for use in subsequent creation calls. (You'd probably want to do some null checking first.)

DataStudioAsset (report)

A Google Data Studio report asset requires a name and a qualifiedName. For creation, you also need to specify the connectionQualifiedName of the connection for the workspace and set the dataStudioAssetType to REPORT.

Create a Google Data Studio report
DataStudioAsset report = DataStudioAsset.creator( // (1)
"gds-report", // (2)
connectionQualifiedName, // (3)
GoogleDataStudioAssetType.REPORT, // (4)
"identifier-from-gds") // (5)
.build();
AssetMutationResponse response = report.save(client); // (6)
  1. Build up the minimum request to create a report asset.
  2. Provide a human-readable name for your report asset.
  3. Provide the qualifiedName of the connection for this report asset.
  4. Specify the type of the asset, to make sure we're creating a report asset.
  5. (Recommended) Provide the unique identifier of this asset, from Google Data Studio itself. This will allow you to reconstruct the qualifiedName, for example if you later want to update this same asset. Alternatively, you can leave out this final parameter and a random UUID will be generated for you; however, you won't have a way to reconstruct this later for more efficient updates.
  6. Actually call Atlan to create the report asset. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

DataStudioAsset (source)

A Google Data Studio data source asset requires a name and a qualifiedName. For creation, you also need to specify the connectionQualifiedName of the connection for the workspace and set the dataStudioAssetType to DATA_SOURCE.

Create a Google Data Studio data source
DataStudioAsset source = DataStudioAsset.creator( // (1)
"gds-source", // (2)
connectionQualifiedName, // (3)
GoogleDataStudioAssetType.DATA_SOURCE, // (4)
"identifier-from-gds") // (5)
.build();
AssetMutationResponse response = source.save(client); // (6)
  1. Build up the minimum request to create a data source asset.
  2. Provide a human-readable name for your data source asset.
  3. Provide the qualifiedName of the connection for this data source asset.
  4. Specify the type of the asset, to make sure we're creating a data source asset.
  5. (Recommended) Provide the unique identifier of this asset, from Google Data Studio itself. This will allow you to reconstruct the qualifiedName, for example if you later want to update this same asset. Alternatively, you can leave out this final parameter and a random UUID will be generated for you; however, you won't have a way to reconstruct this later for more efficient updates.
  6. Actually call Atlan to create the data source asset. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

Available relationships

Every level of the business intelligence structure is an Asset, and can therefore be related to the following other assets.

Footnotes

  1. Although if you want to delete everything in a connection, your better avenue is the packaged connection delete utility in the UI.

Was this page helpful?