fields_hidden_by_default

Usage

view: view_name {
  fields_hidden_by_default: yes 
}
Hierarchy
fields_hidden_by_default
Accepts
A Boolean (yes or no)

Definition

By default, all fields in a view are displayed in the view's Explores. If you want a field to be available for modeling but not shown to users, you can hide the field from the Explore field picker by adding the hidden: yes parameter to the field.

If you want to hide most of the fields in a view, you can instead add the fields_hidden_by_default: yes parameter to the view. This sets the default for all the view's fields to hidden:yes. Then, if you want to display a field in the view, you can add the hidden:no parameter to the field.

Hidden fields can still be accessed in the UI if they are manually added to the URL. Therefore, the hidden value is a way to keep the field picker clean; it is not a security feature.

Examples

This example airports view has the fields_hidden_by_default: yes parameter, so all fields are hidden in the view's Explores by default. The country dimension is defined with hidden:no, so it will be displayed in the view's Explores. The id dimension has no hidden parameter, so it will take the default value and will be hidden in the view's Explores.

view: airports {
  sql_table_name: flightstats.airports ;;
  fields_hidden_by_default: yes

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }
  dimension: county {
    type: string
    sql: ${TABLE}.county ;;
    hidden: no
  }