Skip to main content
Curates the fields available in the topic. By default, all fields from the base view and joined views are included.

Syntax

fields: [<field_selector>, ...]

Properties

fields
string[]
An array of field selectors that determine which fields are available in the topic. Supports the following operators:
OperatorDescriptionOrder of operations
all_views.*Targets all fields from all views in the topic1
view.*Targets all fields in a view2
tag:<value>Targets fields and views with the specified tag3
view.fieldTargets a specific field4
Omni will evaluate the operators according to the Order of operations value in the above table. This means all_views is evaluated first, then specific views, and so on. This allows you to exclude views and then add specific fields back in.
To exclude a view, tag, or field, prefix the clause with a -. For example: -users.*

Examples

Only include the users view
fields: [users.*]
Exclude the users view
fields: [all_views.*, -users.*]
Exclude only the users.id field
fields: [all_views.*, -users.id]
Exclude fields with the pii tag
fields: [all_views.*, -tag:pii]
Add the user_facts.lifetime_value back in after excluding the user_facts view
fields: [all_views.*, -user_facts.*, user_facts.lifetime_value]
Remove the users.acquisition_cost field from the fields targeted by the marketing tag
fields: [-all_views.*, tag:marketing, -users.acquisition_cost]