Skip to main content

Preset Manage Preset assets

Operations on Preset assets (connections, workspaces, collections, charts, datasets).

In general, these should be:

  • Created in top-down order (connection, then workspace, then collection, then charts and datasets)
  • Deleted in bottom-up order (charts and datasets, then collections, then workspaces, then connections)1

Asset structure

Connection

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

Create a Preset connection
String adminRoleGuid = client.getRoleCache().getIdForName("$admin"); // (1)
Connection connection = Connection.creator( // (2)
"preset-connection", // (3)
AtlanConnectorType.PRESET, // (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 Preset.
  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.)

PresetWorkspace

A Preset workspace requires a name and a qualifiedName. For creation, you also need to specify the connectionQualifiedName of the connection for the workspace.

Create a Preset workspace
PresetWorkspace workspace = PresetWorkspace.creator( // (1)
"ps-workspace", // (2)
connectionQualifiedName) // (3)
.build();
AssetMutationResponse response = workspace.save(client); // (4)
workspace = response.getResult(workspace); // (5)
  1. Build up the minimum request to create a workspace.
  2. Provide a human-readable name for your workspace.
  3. Provide the qualifiedName of the connection for this workspace.
  4. Actually call Atlan to create the workspace. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
  5. Retrieve the created workspace for use in subsequent creation calls. (You'd probably want to do some null checking first.)

PresetDashboard

A Preset collection requires a name and a qualifiedName. For creation, you also need to specify the connectionQualifiedName of the connection for the collection, and the names and qualifiedNames of the collection's ancestors.

Create a Preset collection
PresetDashboard collection = PresetDashboard.creator( // (1)
"ps-collection", // (2)
workspace) // (3)
.build();
AssetMutationResponse response = collection.save(client); // (4)
collection = response.getResult(collection); // (5)
  1. Build up the minimum request to create a collection.
  2. Provide a human-readable name for your collection.
  3. Provide the workspace for this collection. If you didn't already have the object, you could also use PresetWorkspace.refByGuid() with the GUID of the workspace, or PresetWorkspace.refByQualifiedName() with the qualifiedName of the workspace.
  4. Actually call Atlan to create the collection. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.
  5. Retrieve the created collection for use in subsequent creation calls. (You'd probably want to do some null checking first.)

PresetChart

A Preset chart requires a name and a qualifiedName. For creation, you also need to specify the connectionQualifiedName of the connection for the chart, and the names and qualifiedNames of the chart's ancestors.

Create a Preset chart
PresetChart chart = PresetChart.creator( // (1)
"ps-chart", // (2)
collection) // (3)
.build();
AssetMutationResponse response = chart.save(client); // (4)
  1. Build up the minimum request to create a chart.
  2. Provide a human-readable name for your chart.
  3. Provide the collection for this chart.
  4. Actually call Atlan to create the chart. Because this operation will persist the asset in Atlan, you must provide it an AtlanClient through which to connect to the tenant.

PresetDataset

A Preset dataset requires a name and a qualifiedName. For creation, you also need to specify the connectionQualifiedName of the connection for the dataset, and the names and qualifiedNames of the dataset's ancestors.

Create a Preset dataset
PresetDataset dataset = PresetDataset.creator( // (1)
"ps-dataset", // (2)
collection) // (3)
.build();
AssetMutationResponse response = dataset.save(client); // (4)
  1. Build up the minimum request to create a dataset.
  2. Provide a human-readable name for your dataset.
  3. Provide the collection for this dataset.
  4. Actually call Atlan to create the dataset. 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?