Manage popularity¶
Popularity gives additional context to the usage of assets. From popularity, you can see various information such as:
- users who have queried an asset, including:
- those who have most recently queried the asset
- those who have most frequently queried the asset
- details about queries against the asset, including:
- the most frequently run queries
- the slowest-running queries
- the most expensive queries
Popularity is only populated on certain assets by Atlan
Out-of-the-box, only specific crawlers currently populate popularity information on assets. However, the attributes involved are actually available behind-the-scenes on all assets.
Make details visible in the UI¶
Usage details not visible by default
By default, only the crawlers that support usage details out-of-the-box will show the usage details in the Atlan UI. To make usage details visible for other assets you must enable this at a connection level.
During connection creation¶
To create a popularity-enabled connection:
Create a popularity-enabled connection | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
- Retrieve the GUID for the admin role, to use later for defining the roles that can administer the connection.
- Build up the minimum request to create a connection.
- Provide a human-readable name for your connection.
-
Set the type of connection.
Determines the icon
This determines the icon that Atlan will use for all the assets in the connection.
-
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 GUID(s) of the workspace role(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - 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 name(s) of the group(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List the user names that can administer this connection (or null if none). Note that the values here are the username(s) of the user(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - Set the
hasPopularityInsights
property totrue
— this is the key piece to ensuring usage details will be visible in the UI for assets in this connection. - Actually call Atlan to create the connection.
Create a relational connection | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
- Retrieve the GUID for the admin role, to use later for defining the roles that can administer the connection.
- Build up the minimum request to create a connection.
- Provide a human-readable name for your connection.
-
Set the type of connection.
Determines the icon
This determines the icon that Atlan will use for all the assets in the connection.
-
List the workspace roles that should be able to administer the connection (if any, defaults to
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 GUID(s) of the workspace role(s). At least one ofadmin_roles
,admin_groups
, oradmin_users
must be provided. - List the group names that can administer this connection (if any, defaults to
None
). All users within that group (current and future) will be administrators of the connection. Note that the values here are the name(s) of the group(s). At least one ofadmin_roles
,admin_groups
, oradmin_users
must be provided. - List the user names that can administer this connection (if any, defaults to
None
). Note that the values here are the username(s) of the user(s). At least one ofadmin_roles
,admin_groups
, oradmin_users
must be provided. - Set the
has_popularity_insights
property toTrue
— this is the key piece to ensuring usage details will be visible in the UI for assets in this connection. - Actually call Atlan to create the connection.
Create a popularity-enabled connection | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
- Retrieve the GUID for the admin role, to use later for defining the roles that can administer the connection.
- Build up the minimum request to create a connection.
- Provide a human-readable name for your connection.
-
Set the type of connection.
Determines the icon
This determines the icon that Atlan will use for all the assets in the connection.
-
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 GUID(s) of the workspace role(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - 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 name(s) of the group(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List the user names that can administer this connection (or null if none). Note that the values here are the username(s) of the user(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - Set the
hasPopularityInsights
property totrue
— this is the key piece to ensuring usage details will be visible in the UI for assets in this connection. - Actually call Atlan to create the connection.
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
- The
typeName
must be exactlyConnection
. - Human-readable name for your connection.
-
The
connectorName
should be a known value, such ashive
.Determines the icon
This determines the icon that Atlan will use for all the assets in the connection. If you use a value that is not a known value, you will have a default gear icon instead.
-
The
qualifiedName
should follow the pattern:default/<connectorName>/<epoch>
, where<epoch>
is the time in milliseconds at which the connection is being created, and<connectorName>
exactly matches the value used forconnectorName
(above). - The
category
should also be a known value, that defines the kind of relational store. This could for example bewarehouse
orrdbms
. - List any workspace roles that can administer this connection. All users with that workspace role (current and future) will be administrators of the connection. Note that the values here need to be the GUID(s) of the workspace role(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List any groups that can administer this connection. All users within that group (current and future) will be administrators of the connection. Note that the values here are the name(s) of the group(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - List any users that can administer this connection. Note that the values here are the username(s) of the user(s). At least one of
adminRoles
,adminGroups
, oradminUsers
must be provided. - Set the
hasPopularityInsights
property totrue
— this is the key piece to ensuring usage details will be visible in the UI for assets in this connection.
Update an existing connection¶
To update an existing connection:
Update connection to make popularity visible | |
---|---|
1 2 3 4 5 |
|
- Build an object referencing the existing connection. In this example we will retrieve it first, but you could also search for it or use the
updater()
method to construct an update. - If starting from an existing object, remember to
trimToRequired()
to get a builder with the minimal required information for an update. - Set the
hasPopularityInsights
property totrue
. - Build the object, so it is ready to be persisted.
- Persist the object by saving it.
Update connection to make popularity visible | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
- Build an object referencing the existing connection. In this example we will retrieve it first, but you could also search for it or use the
updater()
method to construct an update. - If starting from an existing object, remember to
trim_to_required()
to get an asset with the minimal required information for an update. - Set the
has_popularity_insights
property toTrue
. - Persist the object by saving it.
Update connection to make popularity visible | |
---|---|
1 2 3 4 5 |
|
- Build an object referencing the existing connection. In this example we will retrieve it first, but you could also search for it or use the
updater()
method to construct an update. - If starting from an existing object, remember to
trimToRequired()
to get a builder with the minimal required information for an update. - Set the
hasPopularityInsights
property totrue
. - Build the object, so it is ready to be persisted.
- Persist the object by saving it.
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
- The connection must be wrapped in an
entities
array. - You must use a
typeName
ofConnection
to update the connection. - You must then wrap additional details in an
attributes
object. - You must provide the exact
qualifiedName
of the connection (case-sensitive). - You must provide the exact name of the connection (case-sensitive).
- Set the
hasPopularityInsights
property totrue
.
Retrieve usage details¶
Since popularity details are only available on certain assets, you will need to retrieve one of those assets to see the usage details:
Retrieve popularity | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
- Use the
get()
method to retrieve all details about a specific asset. - Provide the full, case-sensitive qualifiedName of the asset.
-
You can retrieve single quantified metrics for various aspects, such as:
- An overall popularity score for the asset (higher is better), using
getPopularityScore()
. - The total number of all read operations on the asset, using
getSourceReadCount()
. - The total cost of all read operations on the asset, using
getSourceReadQueryCost()
. - The total number of unique users that read data from the asset, using
getSourceReadUserCount()
. - The total cost of all operations on the asset, using
getSourceTotalCost()
.
- An overall popularity score for the asset (higher is better), using
-
You can retrieve lists of various aspects, such as:
- The top query running engines (warehouses), using
getSourceQueryComputeCosts()
. - The users who most recently queried the asset, using
getSourceReadRecentUsers()
. - The users who most frequently query the asset, using
getSourceReadTopUsers()
.
- The top query running engines (warehouses), using
-
You can also list more detailed information about individual metrics, such as:
- The top query running engines (warehouses) and their related cost, using
getSourceQueryComputeCostRecords()
. - The users who most recently queried the asset, the number of times they've queried it and when they last queried it, using
getSourceReadRecentUserRecords()
. - The users who most frequently query the asset, the number of times they've queried it and when they last queried it, using
getSourceReadTopUserRecords()
.
- The top query running engines (warehouses) and their related cost, using
-
You can also list details about specific queries, such as:
- The list of most expensive queries against this asset, using
getSourceReadExpensiveQueryRecords()
. - The list of the most frequently run queries against this asset, using
getSourceReadPopularQueryRecords()
. - The list of the slowest-running queries against this asset, using
getSourceReadSlowQueryRecords()
.
- The list of most expensive queries against this asset, using
Retrieve popularity | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
- Use the
asset.get_by_qualified_name()
method to retrieve all details about a specific asset. - Provide the full, case-sensitive qualified_name of the asset, and the type of the asset.
-
You can retrieve single quantified metrics for various aspects, such as:
- An overall popularity score for the asset (higher is better), using
popularity_score
. - The total number of all read operations on the asset, using
source_read_count
. - The total cost of all read operations on the asset, using
source_read_query_cost
. - The total number of unique users that read data from the asset, using
source_read_user_count
. - The total cost of all operations on the asset, using
source_total_cost
.
- An overall popularity score for the asset (higher is better), using
-
You can retrieve lists of various aspects, such as:
- The top query running engines (warehouses), using
source_query_compute_cost_list
. - The users who most recently queried the asset, using
source_read_recent_user_list
. - The users who most frequently query the asset, using
source_read_top_user_list
.
- The top query running engines (warehouses), using
-
You can also list more detailed information about individual metrics, such as:
- The top query running engines (warehouses) and their related cost, using
source_query_compute_cost_record_list
. - The users who most recently queried the asset, the number of times they've queried it and when they last queried it, using
source_read_recent_user_record_list
. - The users who most frequently query the asset, the number of times they've queried it and when they last queried it, using
source_read_top_user_record_list
.
- The top query running engines (warehouses) and their related cost, using
-
You can also list details about specific queries, such as:
- The list of most expensive queries against this asset, using
source_read_expensive_query_record_list
. - The list of the most frequently run queries against this asset, using
source_read_popular_query_record_list
. - The list of the slowest-running queries against this asset, using
source_read_slow_query_record_list
.
- The list of most expensive queries against this asset, using
Retrieve popularity | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
- Use the
get()
method to retrieve all details about a specific asset. - Provide the full, case-sensitive qualifiedName of the asset.
-
You can retrieve single quantified metrics for various aspects, such as:
- An overall popularity score for the asset (higher is better), using
.popularityScore
. - The total number of all read operations on the asset, using
.sourceReadCount
. - The total cost of all read operations on the asset, using
.sourceReadQueryCost
. - The total number of unique users that read data from the asset, using
.sourceReadUserCount
. - The total cost of all operations on the asset, using
.sourceTotalCost
.
- An overall popularity score for the asset (higher is better), using
-
You can retrieve lists of various aspects, such as:
- The top query running engines (warehouses), using
.sourceQueryComputeCosts
. - The users who most recently queried the asset, using
.sourceReadRecentUsers
. - The users who most frequently query the asset, using
.sourceReadTopUsers
.
- The top query running engines (warehouses), using
-
You can also list more detailed information about individual metrics, such as:
- The top query running engines (warehouses) and their related cost, using
.sourceQueryComputeCostRecords
. - The users who most recently queried the asset, the number of times they've queried it and when they last queried it, using
.sourceReadRecentUserRecords
. - The users who most frequently query the asset, the number of times they've queried it and when they last queried it, using
.sourceReadTopUserRecords
.
- The top query running engines (warehouses) and their related cost, using
-
You can also list details about specific queries, such as:
- The list of most expensive queries against this asset, using
.sourceReadExpensiveQueryRecords
. - The list of the most frequently run queries against this asset, using
.sourceReadPopularQueryRecords
. - The list of the slowest-running queries against this asset, using
.sourceReadSlowQueryRecords
.
- The list of most expensive queries against this asset, using
GET /api/meta/entity/uniqueAttribute/type/Table?attr:qualifiedName=default%2Fhive%2F1657025257%2FOPS%2FDEFAULT%2FRUN_STATS | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
- All asset details will come back wrapped in a top-level
entity
object in the payload. - The
typeName
will indicate what kind of asset is returned. - The detailed usage information will be embedded in the
attributes
object within the outerentity
object. - With the exception of the
popularityScore
, all other usage details have names that all start withsource...
Add your own usage details¶
In cases where Atlan does not popularity details from the source, you may want to add your own. You can do this by either adding the usage details when creating the asset (programmatically) or by updating the attributes on an existing asset:
Add or update usage details | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
- Use the
updater()
method to update an existing asset, providing the required details for that particular asset type (for more details, see Updating an asset). - For single quantified metrics, you can directly set the metric.
- For lists, you can directly set the lists or individually add elements (or a combination of the two).
- For the more detailed records, you need to build the
PopularityInsights
object with its embedded details. As with the lists you can associate these detailed records with the asset many-at-a-time or one-by-one. - Finally, you must save the object you've built up to persist this information in Atlan.
Add or update usage details | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
- Use the
updater()
method to update an existing asset, providing the required details for that particular asset type (for more details, see Updating an asset). - For single quantified metrics, you can directly set the metric.
- For lists, you can directly set the lists.
- For the more detailed records, you need to build each
PopularityInsights
object with its embedded details. - Finally, you must save the object you've built up to persist this information in Atlan.
Add or update usage details | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
- Use the
updater()
method to update an existing asset, providing the required details for that particular asset type (for more details, see Updating an asset). - For single quantified metrics, you can directly set the metric.
- For lists, you can directly set the lists or individually add elements (or a combination of the two).
- For the more detailed records, you need to build the
PopularityInsights
object with its embedded details. As with the lists you can associate these detailed records with the asset many-at-a-time or one-by-one. - Finally, you must save the object you've built up to persist this information in Atlan.
POST /api/meta/entity/bulk | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|
- All assets must be wrapped in an
entities
array. - The
typeName
must match the appropriate type for the asset being updated. - You must provide the exact name of the asset (case-sensitive).
- You must provide the exact
qualifiedName
of the asset (case-sensitive). - For single quantified metrics, you can directly set the metric.
- For lists, you can directly set the lists.
- For the more detailed records, you need to build each
PopularityInsights
object with its embedded details.