KeywordField¶
- class pyatlan.model.fields.atlan_fields.KeywordField(atlan_field_name: StrictStr, keyword_field_name: StrictStr)[source]¶
Represents any field in Atlan that can be searched only by keyword (no text-analyzed fuzziness).
- bucket_by(size: int = 10, include_source_value: bool = False, nested: Dict[Any, Aggregation] | None = None, order: List[Dict[str, SortOrder]] | None = None) Aggregation ¶
Return criteria to bucket results based on the provided field.
- Parameters:
size – the number of buckets to include results across, defaults to 10.
include_source_value – whether to include the source value (True) or not (False)
nested – (optional) nested aggregations to include.
order – (optional) the order for the buckets.
- Returns:
criteria to bucket results by the provided field,
across a maximum number of buckets defined by the provided size.
- eq(value: StrictStr, case_insensitive: bool = False) Query [source]¶
Returns a query that will match all assets whose field has a value that exactly matches the provided string value.
- Parameters:
value – the value (string) 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
- 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
- property in_lineage: LineageFilterFieldString¶
Returns a proxy which can be used a lineage filter with the appropriate subset of conditions
- property keyword_field_name: str¶
Returns the name of the keyword field index for this attribute in Elastic.
- Returns:
the field name for the keyword index on this attribute
- 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
- regexp(value: StrictStr, case_insensitive: bool = False) Query [source]¶
Returns a query that retrieves assets whose attribute value matches the provided regular expression. This function is particularly useful for searching based on more complicated naming conventions.
- Parameters:
value – The regular expression to match against the asset’s attribute value.
case_insensitive – If True, performs a case-insensitive match. Defaults to False.
- Returns:
A query that matches assets with the specified regex pattern for the designated attribute.
- 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
- wildcard(value: StrictStr, case_insensitive: bool = False) Query [source]¶
Returns a query that retrieves assets whose attribute value matches the provided wildcard pattern. This function is particularly useful for searching based on simple naming conventions.
- Parameters:
value – The wildcard pattern to match against the asset’s attribute value.
case_insensitive – If True, performs a case-insensitive match. Defaults to False.
- Returns:
A query that matches assets with the specified wildcard pattern for the designated attribute.
- 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