CustomMetadataField#
- class pyatlan.model.fields.atlan_fields.CustomMetadataField(set_name: str, attribute_name: str)[source]#
Utility class to simplify searching for values on custom metadata attributes.
- between(minimum: StrictInt | StrictFloat, maximum: StrictInt | StrictFloat) Query [source]#
Returns a query that will match all assets whose field has a value between the minimum and maximum specified values, inclusive.
- bucket_by(size: int = 10) Aggregation #
- Return criteria to bucket results based on the provided field.
- param size:
the number of buckets to include results across.
- returns:
criteria to bucket results by the provided field, across a maximum number of buckets defined by
the provided size
*/
- eq(value: StrictStr | StrictInt | StrictFloat | StrictBool | datetime, case_insensitive: bool = False) Query [source]#
Returns a query that will match all assets whose field has a value that exactly equals the provided value.
- Parameters:
value – the value to check the field’s value is exactly equal to
case_insensitive – if True, will match the value irrespective of case, otherwise will be a case-sensitive match
- Returns:
a query that will only match assets whose value for the field is exactly equal to the value provided
- gt(value: StrictInt | StrictFloat) Query [source]#
Returns a query that will match all assets whose field has a value that is strictly greater than the provided numeric value.
- Parameters:
value – the numeric value to compare against
- Returns:
a query that will only match assets whose value for the field is strictly greater than the numeric value provided
- gte(value: StrictInt | StrictFloat) Query [source]#
Returns a query that will match all assets whose field has a value that is greater than or equal to the provided numeric value.
- Parameters:
value – the numeric value to compare against
- Returns:
a query that will only match assets whose value for the field is greater than or equal to the numeric value provided
- has_any_value() Query #
Returns a query that will only match assets that have some non-null, non-empty value (no matter what actual value) for the field.
- Returns:
a query that will only match assets that have some non-null, non-empty value for the field
- lt(value: StrictInt | StrictFloat) Query [source]#
Returns a query that will match all assets whose field has a value that is strictly less than the provided numeric value.
- Parameters:
value – the numeric value to compare against
- Returns:
a value that will only match assets whose value for the field is strictly less than the numeric value provided
- lte(value: StrictInt | StrictFloat) Query [source]#
Returns a query that will match all assets whose field has a value that is less than or equal to the provided numeric value.
- Parameters:
value – the numeric value to compare against
- Returns:
a query that will only match assets whose value for the field is less than or equal to the numeric value provided
- match(value: StrictStr) Query [source]#
Returns a query that will textually match the provided value against the field. This analyzes the provided value according to the same analysis carried out on the field (for example, tokenization, stemming, and so on).
- Parameters:
value – the string value to match against
- Returns:
a query that will only match assets whose analyzed value for the field matches the value provided (which will also be analyzed)
- order(order: SortOrder = SortOrder.ASCENDING) SortItem #
Returns a condition to sort results by the field, in the specified order.
- Parameters:
order – in which to sort the results
- Returns:
sort condition for the field, in the specified order
- startswith(value: StrictStr, case_insensitive: bool = False) Query [source]#
Returns a query that will match all assets whose field has a value that starts with the provided value. Note that this can also be a case-insensitive match.
- Parameters:
value – the value (prefix) to check the field’s value starts with
case_insensitive – if True, will match the value irrespective of case, otherwise will be a case-sensitive match
- Returns:
a query that will only match assets whose value for the field starts with the value provided
- within(values: List[str]) Query [source]#
Returns a query that will match all assets whose field has a value that exactly matches at least one of the provided string values.
- Parameters:
values – the values (strings) to check the field’s value is exactly equal to
- Returns:
a query that will only match assets whose value for the field is exactly equal to at least one of the values provided