Filter-only fields
aliases:
aliases: to the field in question pointing references from the old field name to the updated field name, restoring content and eliminating content related errors. This behaves similar to table level aliases, as shown
bind_to:
default_filter:
default_filterwill automatically populate the filter value in the templated object- This is often paired with
filter_single_select_onlyandsuggestion_listwhen a single-selection is required - For setting the filter arguments, use the filter syntax
description:
- Metadata about the field, made available in the workbook/dashboard table UI upon hovering over a field with a description, or on right click from the field picker
- Omni expects unquoted text (quotes will be removed / ignored)
display_order:
- Omni expects a whole number
- This will override the sort order for the field picker, inside the field’s grouping (i.e. inside a given view)
display_orderwill supersede alphabetical sorting
- For example, if the two fields above in users are given
display_order:they will float to the top of the field list in users, and the remaining fields would be sorted alphabetically - To rearrange views,
display_ordercan be used at the view level - For fields inside groups using
group_label, the group will be ranked with the min of all the fields in the group (i.e. if there are 3 fields withdisplay_orderof 4, 5 and {empty}, the group will have adisplay_orderof 4)
filter_single_select_only:
- This argument will require the filter field to use a choose-one dropdown rather than the default flexible filter modal
- Recommended with templated filters that require one-and-only-one object
group_label:
- This will nest a group of fields in the field picker for curated organization
- Omni expects unquoted text (quotes will be removed / ignored)
- Note measures and dimensions will still be in separate sections in the field picker under each view
- Fields can be nested under timeframes using the group label - the text rather than the field should be used (i.e.
Created Atnotcreated_at)
hidden:
- Remove the field from the UI. Still referenceable in the model, but hidden in the workbook UI.
- Expects ‘true’ or ‘false’
ignored:
Likely should not be used with filters, can just delete or comment out if it’s not desired in the model
label:
- Label will override the field name for all UI appearances of the field
- Omni expects unquoted text (quotes will be removed / ignored)
required_access_grants:
You can also conditionally allow access by using pipes (|) and ampersands (&) to create OR and AND conditions.
suggestion_list:
- Suggestion list will explicitly set the suggestions on
suggest_from_field:
- This argument can be used to populate a filter with another field’s values
- Commonly used with the filter is injected in sql with a corresponding modeled field
suggest_from_topic:
- This needs to be paired with
suggest_from_fieldand can tune the specific topic (ie access-filters and default filters) for a given suggestion
type:
-
Currently, filter-only fields can only be defined in the IDE. They require a name, and a type. The accepted types for a filter-only field are:
booleancolumn(returns unquoted text, can be used to substitute in column names in query views)numbermost commonstringmost commontimestampmost common
view_label:
- This will nest a given field under a different view than it’s default parent view, for example, grouping
user_factsfields under theusersview for better organization and discovery - Note that filters will always be below dimensions and measures
- Sometimes can be valuable to pull all filters into a separate psuedo-view, would do that with the
viewargument as seen here