User Guide Getting Started Help Center Documentation Community Training
New LookML
Old LookML
New LookML
  
English
日本語
approximate

Usage

view: view_name {
  measure: field_name {
    approximate: yes
  }
}

Hierarchy

approximate

Possible Field Types

Measure

Accepts

A Boolean (yes or no)

Definition

If you are using Redshift or BigQuery Legacy SQL, the approximate parameter enables you to use approximate counting with type: count and type: count_distinct measures. With large datasets, approximate counts can be much faster than exact counts, and are typically within a few percent of the actual value. Please check your SQL dialect’s documentation to understand the speed and accuracy tradeoffs of this method.

measure: apx_unique_count { type: count_distinct approximate: yes # default value is no sql: ${id} ;; }

Turning on approximate with a type: count measure may seem unnecessary, because the approximate counting feature only applies to distinct counts. However, there are some situations when Looker automatically turns type: count measures into a distinct count of a primary key, to provide accurate results for joined views. In those situations approximate counting may be useful.

Top