Common search fields
These attributes exist on all assets in Atlan. You can therefore use them to search all assets in Atlan.
The complete list of attributes that can be searched is extensive. Rather than list every single attribute here, particularly since they vary based on the kind of asset you're looking for, instead see the full model reference.
Asset.GUID
The globally unique identifier (GUID) of any object in Atlan.
The identifier has no meaning, and is randomly generated, but is guaranteed to uniquely identify only a single asset.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.GUID.eq("25638e8c-0225-46fd-a70c-304117370c4c")) // (2)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific GUID. This uses a term query to exactly match the GUID.Equivalent query from ElasticQuery byGuid = TermQuery.of(t -> t
.field("__guid")
.value("25638e8c-0225-46fd-a70c-304117370c4c"))
._toQuery();
Optional<Asset> asset = index.search(client).stream().findFirst();
if (asset.isPresent())
- For a search by GUID, you would expect either no results, or at most a single result.
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.GUID.eq("25638e8c-0225-46fd-a70c-304117370c4c")) # (2)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific GUID. This uses a term query to exactly match the GUID.
client = AtlanClient()
response = client.asset.search(index)
if response.count > 0:
guid = response.current_page()[0].guid # (1)
- For a search by GUID, you would expect either no results, or at most a single result.
val index = client.assets.select() // (1)
.where(Asset.GUID.eq("25638e8c-0225-46fd-a70c-304117370c4c")) // (2)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific GUID. This uses a term query to exactly match the GUID.Equivalent query from Elasticval byGuid = TermQuery.of(t -> t
.field("__guid")
.value("25638e8c-0225-46fd-a70c-304117370c4c"))
._toQuery()
val asset = index.search(client).stream().findFirst()
if (asset.isPresent)
- For a search by GUID, you would expect either no results, or at most a single result.
{
"dsl": {
"query": {
"term": { "__guid": "25638e8c-0225-46fd-a70c-304117370c4c" } // (1)
}
},
"attributes": [ "__guid" ]
}
- You can use a term query to exactly match the GUID.
{
"entities": [
{
"attributes": {
"__guid": "25638e8c-0225-46fd-a70c-304117370c4c"
},
"guid": "25638e8c-0225-46fd-a70c-304117370c4c"
}
]
}
Asset.CREATED_BY
The Atlan user who created this asset.
If created via API, this will be a unique identifier for the API token used. Otherwise, this will be the username of the user that created the asset through the Atlan UI.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.CREATED_BY.eq("jdoe")) // (2)
.includeOnResults(Asset.CREATED_BY) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific username. This uses a term query to exactly match the username.Equivalent query from ElasticQuery byCreator = TermQuery.of(t -> t
.field("__createdBy")
.value("jdoe"))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The creator can be retrieved from a result through
.getCreatedBy().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.CREATED_BY.eq("jdoe")) # (2)
.include_on_results(Asset.CREATED_BY) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific username. This uses a term query to exactly match the username. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
creator = result.created_by # (2)
- For details, see Searching for assets.
- The creator can be retrieved from a result through
.created_by.
val index = client.assets.select() // (1)
.where(Asset.CREATED_BY.eq("jdoe")) // (2)
.includeOnResults(Asset.CREATED_BY) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific username. This uses a term query to exactly match the username.Equivalent query from Elasticval byCreator = TermQuery.of(t -> t
.field("__createdBy")
.value("jdoe"))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The creator can be retrieved from a result through
.createdBy.
{
"dsl": {
"query": {
"term": { "__createdBy": "jdoe" } // (1)
}
},
"attributes": [ "__createdBy" ]
}
- You can use a term query to exactly match the username.
{
"entities": [
{
"attributes": {
"__createdBy": "jdoe"
},
"createdBy": "jdoe"
}
]
}
Asset.UPDATED_BY
The Atlan user who last updated the asset.
If updated via API, this will be a unique identifier for the API token used. Otherwise, this will be the username of the user that made the change through the Atlan UI.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.UPDATED_BY.eq("jdoe")) // (2)
.includeOnResults(Asset.UPDATED_BY) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific username. This uses a term query to exactly match the username.Equivalent query from ElasticQuery byUpdater = TermQuery.of(t -> t
.field("__modifiedBy")
.value("jdoe"))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The updater can be retrieved from a result through
.getUpdatedBy().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.UPDATED_BY.eq("jdoe")) # (2)
.include_on_results(Asset.UPDATED_BY) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific username. This uses a term query to exactly match the username. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
updater = result.updated_by # (2)
- For details, see Searching for assets.
- The updater can be retrieved from a result through
.updated_by.
val index = client.assets.select() // (1)
.where(Asset.UPDATED_BY.eq("jdoe")) // (2)
.includeOnResults(Asset.UPDATED_BY) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific username. This uses a term query to exactly match the username.Equivalent query from Elasticval byUpdater = TermQuery.of(t -> t
.field("__modifiedBy")
.value("jdoe"))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The updater can be retrieved from a result through
.updatedBy.
{
"dsl": {
"query": {
"term": { "__modifiedBy": "jdoe" } // (1)
}
},
"attributes": [ "__modifiedBy" ]
}
- You can use a term query to exactly match the username.
{
"entities": [
{
"attributes": {
"__modifiedBy": "jdoe"
},
"updatedBy": "jdoe"
}
]
}
Asset.CREATE_TIME
The time (in milliseconds) when the asset was created.
This is stored as an epoch: the milliseconds since January 1, 1970 (UTC).
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.CREATE_TIME.gte(1640995200000L)) // (2)
.includeOnResults(Asset.CREATE_TIME) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
gte()predicate looks for any values greater than or equal to the provided epoch-style date (milliseconds since January 1, 1970). This uses a range query to find any assets created on or after a particular date.Equivalent query from ElasticQuery byCreation = RangeQuery.of(r -> r
.field("__timestamp")
.gte(JsonData.of(1640995200000L)))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The creation time can be retrieved from a result through
.getCreateTime().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.CREATE_TIME.gte(1640995200000)) # (2)
.include_on_results(Asset.CREATE_TIME) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
gte()predicate looks for any values greater than or equal to the provided epoch-style date (milliseconds since January 1, 1970). This uses a range query to find any assets created on or after a particular date. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
created = result.create_time # (2)
- For details, see Searching for assets.
- The creation time can be retrieved from a result through
.create_time.
val index = client.assets.select() // (1)
.where(Asset.CREATE_TIME.gte(1640995200000L)) // (2)
.includeOnResults(Asset.CREATE_TIME) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
gte()predicate looks for any values greater than or equal to the provided epoch-style date (milliseconds since January 1, 1970). This uses a range query to find any assets created on or after a particular date.Equivalent query from Elasticval byCreation = RangeQuery.of(r -> r
.field("__timestamp")
.gte(JsonData.of(1640995200000L)))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The creation time can be retrieved from a result through
.createTime.
{
"dsl": {
"query": {
"range": { "__timestamp": { "gte": 1640995200000 }} // (1)
}
},
"attributes": [ "__timestamp" ]
}
- You can use a range query to find any assets created on or after a particular date.
{
"entities": [
{
"attributes": {
"__timestamp": 1654992094524
},
"createTime": 1654992094524
}
]
}
Asset.UPDATE_TIME
The time (in milliseconds) when the asset was last updated.
This is stored as an epoch: the milliseconds since January 1, 1970 (UTC).
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.UPDATE_TIME.gte(1640995200000L)) // (2)
.includeOnResults(Asset.UPDATE_TIME) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
gte()predicate looks for any values greater than or equal to the provided epoch-style date (milliseconds since January 1, 1970). This uses a range query to find any assets modified on or after a particular date.Equivalent query from ElasticQuery byUpdate = RangeQuery.of(r -> r
.field("__modificationTimestamp")
.gte(JsonData.of(1640995200000L)))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The last modified time can be retrieved from a result through
.getUpdateTime().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.UPDATE_TIME.gte(1640995200000)) # (2)
.include_on_results(Asset.UPDATE_TIME) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
gte()predicate looks for any values greater than or equal to the provided epoch-style date (milliseconds since January 1, 1970). This uses a range query to find any assets modified on or after a particular date. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
updated = result.update_time # (2)
- For details, see Searching for assets.
- The last modified time can be retrieved from a result through
.update_time.
val index = client.assets.select() // (1)
.where(Asset.UPDATE_TIME.gte(1640995200000L)) // (2)
.includeOnResults(Asset.UPDATE_TIME) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
gte()predicate looks for any values greater than or equal to the provided epoch-style date (milliseconds since January 1, 1970). This uses a range query to find any assets modified on or after a particular date.Equivalent query from Elasticval byUpdate = RangeQuery.of(r -> r
.field("__modificationTimestamp")
.gte(JsonData.of(1640995200000L)))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The last modified time can be retrieved from a result through
.updateTime.
{
"dsl": {
"query": {
"range": { "__modificationTimestamp": { "gte": 1640995200000 }} // (1)
}
},
"attributes": [ "__modificationTimestamp" ]
}
- You can use a range query to find any assets modified on or after a particular date.
{
"entities": [
{
"attributes": {
"__modificationTimestamp": 1654905667786
},
"updateTime": 1654905667786
}
]
}
Asset.STATUS
The asset status in Atlan. The expected values are:
ACTIVEfor assets that are available in Atlan.DELETEDfor assets that are (soft-)deleted in Atlan. These won't appear in the UI or API responses unless explicitly requested.
Hard-deleted, or "purged" assets are fully erased, and therefore no status exists for them.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.STATUS.eq(AtlanStatus.DELETED)) // (2)
.includeOnResults(Asset.STATUS) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific state. This uses a term query to exactly match the state.Equivalent query from ElasticQuery byState = TermQuery.of(t -> t
.field("__state")
.value(AtlanStatus.DELETED.getValue()))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The status can be retrieved from a result through
.getStatus().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.STATUS.eq(EntityStatus.DELETED.value)) # (2)
.include_on_results(Asset.STATUS) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific state. This uses a term query to exactly match the state. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
status = result.status # (2)
- For details, see Searching for assets.
- The status can be retrieved from a result through
.status.
val index = client.assets.select() // (1)
.where(Asset.STATUS.eq(AtlanStatus.DELETED)) // (2)
.includeOnResults(Asset.STATUS) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match, in this case against a specific state. This uses a term query to exactly match the state.Equivalent query from Elasticval byState = TermQuery.of(t -> t
.field("__state")
.value(AtlanStatus.DELETED.getValue()))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The status can be retrieved from a result through
.status.
{
"dsl": {
"query": {
"term": { "__state": "DELETED" } // (1)
}
},
"attributes": [ "__state" ]
}
- You can use a term query to exactly match the state.
{
"entities": [
{
"attributes": {
"__state": "DELETED"
},
"status": "DELETED"
}
]
}
Asset.ATLAN_TAGS
All directly-assigned Atlan tags that exist on an asset.
The Atlan tag names in the index are an Atlan-internal hashed string, not the human-readable name you see in the UI. The value you search for must be this Atlan-internal hashed string.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.ATLAN_TAGS.hasAnyValue()) // (2)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
hasAnyValue()predicate looks for any value in this field, in this case any Atlan tags. This uses an exists query to check that any value exists in the field.Equivalent query from ElasticQuery byAtlanTag = ExistsQuery.of(q -> q
.field("__traitNames"))
._toQuery();
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The assigned Atlan tags can be retrieved from a result through
.getAtlanTags(). Note that the Java SDK will automatically translate these from the internal hashed string representation of Atlan into the Atlan tag names as you would recognize them in the UI.
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.ATLAN_TAGS.has_any_value()) # (2)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
has_any_value()predicate looks for any value in this field, in this case any Atlan tags. This uses an exists query to check that any value exists in the field.
client = AtlanClient()
for result in client.asset.search(index): # (1)
atlan_tags = result.atlan_tags # (2)
- For details, see Searching for assets.
- The assigned Atlan tags can be retrieved from a result through
.atlan_tags. Note that the Python SDK will automatically translate these from the internal hashed string representation of Atlan into the Atlan tag names as you would recognize them in the UI.
val index = client.assets.select() // (1)
.where(Asset.ATLAN_TAGS.hasAnyValue()) // (2)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
hasAnyValue()predicate looks for any value in this field, in this case any Atlan tags. This uses an exists query to check that any value exists in the field.Equivalent query from Elasticval byAtlanTag = ExistsQuery.of(q -> q
.field("__traitNames"))
._toQuery()
for (result in index.search(client))
- For details, see Searching for assets.
- The assigned Atlan tags can be retrieved from a result through
.atlanTags. Note that the Java SDK will automatically translate these from the internal hashed string representation of Atlan into the Atlan tag names as you would recognize them in the UI.
{
"dsl": {
"query": {
"exists": { "field": "__traitNames" } // (1)
}
},
"attributes": [ "__classificationNames" ]
}
- You can use an exists query to find assets that have a directly-assigned Atlan tag.
{
"entities": [
{
"attributes": {
"__classificationNames": "|E4FUqA9JFgb0VHRZWRAq95|I0oabU4LhZ69Nb0FKBGKfS|"
},
"classificationNames": [
"I0oabU4LhZ69Nb0FKBGKfS",
"E4FUqA9JFgb0VHRZWRAq95"
]
}
]
}
Details
attributes.__classificationNamesin the response is a single string of all Atlan tags, pipe-delimited.classificationNamesin the response is a set (unordered) of strings. Note that its order may or may not match that of the pipe-delimitedattributes.__classificationNamesstring.- When searching for the existence of Atlan tags, the
__traitNamesfield provides more reliable results than searching__classificationNames. The latter can return results that have no Atlan tags (but previously did), while the former returns only those that currently have Atlan tags.
Asset.PROPAGATED_ATLAN_TAGS
All propagated Atlan tags that exist on an asset. This includes Atlan tags propagated by:
- Upstream assets in lineage (from source to target)
- Parent assets (for example, from tables to columns)
- Linked terms
The Atlan tag names in the index are an Atlan-internal hashed string, not the human-readable name you see in the UI. The value you search for must be this Atlan-internal hashed string.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.PROPAGATED_ATLAN_TAGS.hasAnyValue()) // (2)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
hasAnyValue()predicate looks for any value in this field, in this case any propagated Atlan tags. This uses an exists query to check that any value exists in the field.Equivalent query from ElasticQuery byAtlanTag = ExistsQuery.of(q -> q
.field("__propagatedTraitNames"))
._toQuery();
for (Asset result : index.search(client))
-
For details, see Searching for assets.
-
The assigned Atlan tags can be retrieved from a result through
.getAtlanTags(). Note that the Java SDK will automatically translate these from the internal hashed string representation of Atlan into the Atlan tag names as you would recognize them in the UI.How do I distinguish between propagated and direct tags?
From each AtlanTag object you can use .getEntityGuid().
- If this matches the GUID of the asset, the tag has been directly assigned to the asset
- If this is a different GUID from the asset, the tag has been propagated to the asset (the GUID indicates the asset the tag was propagated from) :::
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.PROPAGATED_ATLAN_TAGS.has_any_value()) # (2)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
has_any_value()predicate looks for any value in this field, in this case any propagated Atlan tags. This uses an exists query to check that any value exists in the field.
client = AtlanClient()
for result in client.asset.search(index): # (1)
atlan_tags = result.atlan_tags # (2)
-
For details, see Searching for assets.
-
The assigned Atlan tags can be retrieved from a result through
.atlan_tags. Note that the Python SDK will automatically translate these from the internal hashed string representation of Atlan into the Atlan tag names as you would recognize them in the UI.How do I distinguish between propagated and direct tags?
From each AtlanTag object you can use .entity_guid.
- If this matches the GUID of the asset, the tag has been directly assigned to the asset
- If this is a different GUID from the asset, the tag has been propagated to the asset (the GUID indicates the asset the tag was propagated from) :::
val index = client.assets.select() // (1)
.where(Asset.PROPAGATED_ATLAN_TAGS.hasAnyValue()) // (2)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
hasAnyValue()predicate looks for any value in this field, in this case any propagated Atlan tags. This uses an exists query to check that any value exists in the field.Equivalent query from Elasticval byAtlanTag = ExistsQuery.of(q -> q
.field("__propagatedTraitNames"))
._toQuery()
for (result in index.search(client))
-
For details, see Searching for assets.
-
The assigned Atlan tags can be retrieved from a result through
.atlanTags. Note that the Java SDK will automatically translate these from the internal hashed string representation of Atlan into the Atlan tag names as you would recognize them in the UI.How do I distinguish between propagated and direct tags?
From each AtlanTag object you can use .entityGuid.
- If this matches the GUID of the asset, the tag has been directly assigned to the asset
- If this is a different GUID from the asset, the tag has been propagated to the asset (the GUID indicates the asset the tag was propagated from) :::
{
"dsl": {
"query": {
"exists": { "field": "__propagatedTraitNames" } // (1)
}
},
"attributes": [ "__propagatedClassificationNames" ]
}
- You can use an exists query to find assets that have a propagated Atlan tag.
{
"entities": [
{
"attributes": {
"__propagatedClassificationNames": "|E4FUqA9JFgb0VHRZWRAq95|I0oabU4LhZ69Nb0FKBGKfS|"
},
"classificationNames": [
"I0oabU4LhZ69Nb0FKBGKfS",
"E4FUqA9JFgb0VHRZWRAq95"
]
}
]
}
Details
attributes.__propagatedClassificationNamesin the response is a single string of all Atlan tags, pipe-delimited.classificationNamesin the response is a set (unordered) of strings. Note that its order may or may not match that of the pipe-delimitedattributes.__propagatedClassificationNamesstring.- When searching for the existence of propagated Atlan tags, the
__propagatedTraitNamesfield provides more reliable results than searching__propagatedClassificationNames. The latter can return results that have no Atlan tags (but previously did), while the former returns only those that currently have Atlan tags.
Asset.ASSIGNED_TERMS
All terms attached to an asset.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.ASSIGNED_TERMS.hasAnyValue()) // (2)
.includeOnResults(Asset.ASSIGNED_TERMS) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
hasAnyValue()predicate looks for any value in this field, in this case any term assignments. This uses an exists query to check that any value exists in the field.Equivalent query from ElasticQuery byMeaning = ExistsQuery.of(q -> q
.field("__meanings"))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The assigned Atlan tags can be retrieved from a result through
.getAssignedTerms().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.ASSIGNED_TERMS.has_any_value()) # (2)
.include_on_results(Asset.ASSIGNED_TERMS) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
hasAnyValue()predicate looks for any value in this field, in this case any term assignments. This uses an exists query to check that any value exists in the field. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
assigned_terms = result.assigned_terms # (2)
- For details, see Searching for assets.
- The assigned Atlan tags can be retrieved from a result through
.assigned_terms.
val index = client.assets.select() // (1)
.where(Asset.ASSIGNED_TERMS.hasAnyValue()) // (2)
.includeOnResults(Asset.ASSIGNED_TERMS) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
hasAnyValue()predicate looks for any value in this field, in this case any term assignments. This uses an exists query to check that any value exists in the field.Equivalent query from Elasticval byMeaning = ExistsQuery.of(q -> q
.field("__meanings"))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The assigned Atlan tags can be retrieved from a result through
.assignedTerms.
{
"dsl": {
"query": {
"exists": { "field": "__meanings" } // (1)
}
},
"attributes": [ "__meanings" ]
}
- You can use an exists query to find assets that have any terms assigned.
{
"entities": [
{
"meanings": [
{
"termGuid": "b4113341-251b-4adc-81fb-2420501c30e6",
"relationGuid": "10df06a1-5b7c-492f-b827-bf4f46931c3e",
"displayText": "Example Term",
"confidence": 0
}
]
}
]
}
Details
__meaningsis a keyword array in Elastic, so can't be searched by simple matching.__meaningshas no separate response—the defaultmeaningsappears with or without__meaningsin the attribute list of the request.__meaningsTexthas no separate response—the defaultmeaningNamesappears with or without__meaningsTextin the attribute list of the request.meaningNamesis an (unordered) set of term names, rather than a single string.
Asset.TYPE_NAME
The type of asset. For example, Table, Column, and so on.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.TYPE_NAME.eq(GlossaryTerm.TYPE_NAME)) // (2)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. The Java SDK provides
Asset.TYPE_NAME.eq()andAsset.TYPE_NAME.in()to restrict assets to one or more specific types.Equivalent query from ElasticQuery byType = TermQuery.of(t -> t
.field("__typeName.keyword")
.value(GlossaryTerm.TYPE_NAME))
._toQuery();
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The type name can be retrieved from a result through
.getTypeName().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset, AtlasGlossaryTerm
from pyatlan.model.fluent_search import CompoundQuery, FluentSearch
index = (FluentSearch() # (1)
.where(CompoundQuery.asset_type(AtlasGlossaryTerm)) # (2)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. The Python SDK provides
CompoundQuery.asset_type()andCompoundQuery.asset_types()to restrict assets to one or more specific types.
client = AtlanClient()
for result in client.asset.search(index): # (1)
type_name = result.type_name # (2)
- For details, see Searching for assets.
- The type name can be retrieved from a result through
.type_name.
val index = client.assets.select() // (1)
.where(Asset.TYPE_NAME.eq(GlossaryTerm.TYPE_NAME)) // (2)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. The Java SDK provides
Asset.TYPE_NAME.eq()andAsset.TYPE_NAME.in()to restrict assets to one or more specific types.Equivalent query from Elasticval byType = TermQuery.of(t -> t
.field("__typeName.keyword")
.value(GlossaryTerm.TYPE_NAME))
._toQuery()
for (result in index.search(client))
- For details, see Searching for assets.
- The type name can be retrieved from a result through
.typeName.
{
"dsl": {
"query": {
"term": { "__typeName.keyword": "AtlasGlossaryTerm" } // (1)
}
},
"attributes": [ "__typeName" ]
}
- You can use a term query to exactly match the type.
{
"entities": [
{
"typeName": "AtlasGlossaryTerm",
"attributes": {
"__typeName": "AtlasGlossaryTerm"
}
}
]
}
Asset.SUPER_TYPE_NAMES
All super types of an asset.
For example:
Tablehas super types ofSQL,Catalog,AssetandReferenceable.LookerFieldhas super types ofLooker,BI,Catalog,AssetandReferenceable.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.SUPER_TYPE_NAMES.eq(ISQL.TYPE_NAME)) // (2)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. The Java SDK provides
Asset.SUPER_TYPE_NAMES.eq()andAsset.SUPER_TYPE_NAMES.in()to restrict assets to subtypes of one or more specific supertypes.In the Java SDK, supertypes are interfaces
Note that in the Java SDK, you can find the type name for most supertypes through an interface (prefixing I in front of the supertype name to get the appropriate Java interface class).
:::
Query bySuperType = TermQuery.of(t -> t
.field("__superTypeNames.keyword")
.value(ISQL.TYPE_NAME))
._toQuery();
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The type name can be retrieved from a result through
.getTypeName(). Note that in this example the results list will contain all subtypes ofSQL: databases, schemas, tables, views, columns, and so on.
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset, SQL
from pyatlan.model.fluent_search import CompoundQuery, FluentSearch
index = (FluentSearch() # (1)
.where(CompoundQuery.super_types(SQL)) # (2)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. The Python SDK provides
CompoundQuery.super_types()to restrict assets to subtypes of one or more specific supertypes.
client = AtlanClient()
for result in client.asset.search(index): # (1)
type_name = result.type_name # (2)
- For details, see Searching for assets.
- The type name can be retrieved from a result through
.type_name. Note that in this example the results list will contain all subtypes ofSQL: databases, schemas, tables, views, columns, and so on.
val index = client.assets.select() // (1)
.where(Asset.SUPER_TYPE_NAMES.eq(ISQL.TYPE_NAME)) // (2)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. The Java SDK provides
Asset.SUPER_TYPE_NAMES.eq()andAsset.SUPER_TYPE_NAMES.in()to restrict assets to subtypes of one or more specific supertypes.In the Java SDK, supertypes are interfaces
Note that in the Java SDK, you can find the type name for most supertypes through an interface (prefixing I in front of the supertype name to get the appropriate Java interface class).
:::
val bySuperType = TermQuery.of(t -> t
.field("__superTypeNames.keyword")
.value(ISQL.TYPE_NAME))
._toQuery()
for (result in index.search(client))
- For details, see Searching for assets.
- The type name can be retrieved from a result through
.typeName. Note that in this example the results list will contain all subtypes ofSQL: databases, schemas, tables, views, columns, and so on.
{
"dsl": {
"query": {
"term": { "__superTypeNames.keyword": "SQL" } // (1)
}
},
"attributes": [ "__superTypeNames" ]
}
- You can use a term query to exactly match the type.
{
"entities": [
{
"typeName": "Query"
},
{
"typeName": "Table"
},
{
"typeName": "Database"
},
{
"typeName": "Column"
}
]
}
Details
__superTypeNameshas no separate response—the defaulttypeNameappears with or without__superTypeNamesin the attribute list of the request.
Asset.HAS_LINEAGE
Flag that's true if an asset has at least one process upstream or downstream. Otherwise, it will be false.
Process assets themselves will also be included in the true results, unless excluded by some other search criteria.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.HAS_LINEAGE.eq(true)) // (2)
.includeOnResults(Asset.HAS_LINEAGE) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for any assets with the lineage flag set totrue. This uses a term query to exactly match atruevalue.Equivalent query from ElasticQuery byLineage = TermQuery.of(t -> t
.field("__hasLineage")
.value(true))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The lineage status can be retrieved from a result through
.getHasLineage().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.HAS_LINEAGE.eq(True)) # (2)
.include_on_results(Asset.HAS_LINEAGE) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
eq()predicate looks for any assets with the lineage flag set toTrue. This uses a term query to exactly match aTruevalue. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
has_lineage = result.has_lineage # (2)
- For details, see Searching for assets.
- The lineage status can be retrieved from a result through
.has_lineage.
val index = client.assets.select() // (1)
.where(Asset.HAS_LINEAGE.eq(true)) // (2)
.includeOnResults(Asset.HAS_LINEAGE) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for any assets with the lineage flag set totrue. This uses a term query to exactly match atruevalue.Equivalent query from Elasticval byLineage = TermQuery.of(t -> t
.field("__hasLineage")
.value(true))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The lineage status can be retrieved from a result through
.hasLineage.
{
"dsl": {
"query": {
"term": { "__hasLineage": true } // (1)
}
},
"attributes": [ "__hasLineage" ]
}
- You can use a term query to exactly match the boolean value.
{
"entities": [
{
"attributes": {
"__hasLineage": true
}
}
]
}
Asset.QUALIFIED_NAME
The unique fully-qualified name of any asset in Atlan.
Qualified names are often constructed from the identity characteristics of an asset. For example, included in a database's qualifiedName is the connection that crawled the database. (And included in a schema's qualifiedName is the database it exists in, and therefore it also implicitly includes the connection's qualifiedName since the database's qualifiedName includes it.)
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.QUALIFIED_NAME.startsWith("default/snowflake/1662194632")) // (2)
.includeOnResults(Asset.QUALIFIED_NAME) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
startsWith()predicate looks for any value that starts with the provided string, in this case matching any assets within this connection. This uses a prefix query to match values that start with a particular string rather than the entire value.Equivalent query from ElasticQuery byQN = PrefixQuery.of(p -> p
.field("qualifiedName")
.value("default/snowflake/1662194632"))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The
qualifiedNamecan be retrieved from a result through.getQualifiedName().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.QUALIFIED_NAME.startswith("default/snowflake/1662194632")) # (2)
.include_on_results(Asset.QUALIFIED_NAME) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
startswith()predicate looks for any value that starts with the provided string, in this case matching any assets within this connection. This uses a prefix query to match values that start with a particular string rather than the entire value. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
qualified_name = result.qualified_name # (2)
- For details, see Searching for assets.
- The
qualified_namecan be retrieved from a result through.qualified_name.
val index = client.assets.select() // (1)
.where(Asset.QUALIFIED_NAME.startsWith("default/snowflake/1662194632")) // (2)
.includeOnResults(Asset.QUALIFIED_NAME) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
startsWith()predicate looks for any value that starts with the provided string, in this case matching any assets within this connection. This uses a prefix query to match values that start with a particular string rather than the entire value.Equivalent query from Elasticval byQN = PrefixQuery.of(p -> p
.field("qualifiedName")
.value("default/snowflake/1662194632"))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The
qualifiedNamecan be retrieved from a result through.qualifiedName.
{
"dsl": {
"query": {
"prefix": { "qualifiedName": "default/snowflake/1662194632" } // (1)
}
},
"attributes": [ "qualifiedName" ]
}
- You can use a prefix query to find all the objects in a connection, based on the qualifiedName.
{
"entities": [
{
"attributes": {
"qualifiedName": "default/snowflake/1662194632" //(1)
}
},
{
"attributes": {
"qualifiedName": "default/snowflake/1662194632/SAMPLEDB" // (2)
}
}
]
}
- When searching on prefix you'll get exact matches...
- ...and also matches of any other objects whose value for that attribute starts with the prefix value.
Asset.NAME
The name of the asset in Atlan, as it appears in the UI.
- Java
- Python
- Kotlin
- Raw REST API
IndexSearchRequest index = client.assets.select() // (1)
.where(Asset.NAME.eq("dev", true)) // (2)
.includeOnResults(Asset.NAME) // (3)
.toRequest();
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match (case-insensitively). This uses a term query to exactly match the names, but ignores case due to the second parameter beingtrue.Equivalent query from ElasticQuery byName = TermQuery.of(t -> t
.field("name.keyword")
.value("dev")
.caseInsensitive(true))
._toQuery(); -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (Asset result : index.search(client))
- For details, see Searching for assets.
- The
namecan be retrieved from a result through.getName().
from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Asset
from pyatlan.model.fluent_search import FluentSearch
index = (FluentSearch() # (1)
.where(Asset.NAME.eq("dev", case_insensitive=True)) # (2)
.include_on_results(Asset.NAME) # (3)
).to_request()
- You can search across all assets using a
FluentSearch()object. (For details, see Searching for assets.) - Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match (case-insensitively). This uses a term query to exactly match the names, but ignores case due to the second parameter beingtrue. - To make sure the details of this field are included in each result, add the field to
include_on_results().
client = AtlanClient()
for result in client.asset.search(index): # (1)
name = result.name # (2)
- For details, see Searching for assets.
- The
namecan be retrieved from a result through.name.
val index = client.assets.select() // (1)
.where(Asset.NAME.eq("dev", true)) // (2)
.includeOnResults(Asset.NAME) // (3)
.toRequest()
-
You can search across all assets using the
select()method of theassetsmember on any client. (For details, see Searching for assets.) -
Then provide a predicate and value to search. In this example the
eq()predicate looks for an exact match (case-insensitively). This uses a term query to exactly match the names, but ignores case due to the second parameter beingtrue.Equivalent query from Elasticval byName = TermQuery.of(t -> t
.field("name.keyword")
.value("dev")
.caseInsensitive(true))
._toQuery() -
To make sure the details of this field are included in each result, add the field to
includeOnResults().
for (result in index.search(client))
- For details, see Searching for assets.
- The
namecan be retrieved from a result through.name.
{
"dsl": {
"query": {
"term": { "name.keyword": { "value": "dev" }} // (1)
}
},
"attributes": [ "name" ]
}
- A term query on the keyword index will only match results whose name is exactly
dev—notdevelopmentordeveloperor any other variation.
{
"entities": [
{
"attributes": {
"name": "dev"
}
}
]
}