approximate Stay organized with collections Save and categorize content based on your preferences.
Usage
view: view_name { measure: field_name { approximate:yes }}Hierarchy approximate | Possible Field Types MeasureAccepts A Boolean (yes or no) |
Definition
See theDialect support for
approximatesection on this page for the list of dialects that supportindexes.
Theapproximate parameter lets you use approximate counting with measures oftype: count andtype: count_distinct. With large datasets, approximate counts can bemuch 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 onapproximate with a measure oftype: count might seem unnecessary, because the approximate counting feature applies only to distinct counts. However, there are some situations when Looker automatically turns measures oftype: count into a distinct count of a primary key to provide accurate results for joined views. In those situations, approximate counting may be useful.
Dialect support forapproximate
The ability to useapproximate depends on the database dialect your Looker connection is using. In the latest version of Looker, the following dialects supportapproximate:
| Dialect | Supported? |
|---|---|
| Actian Avalanche | |
| Amazon Athena | |
| Amazon Aurora MySQL | |
| Amazon Redshift | |
| Amazon Redshift 2.1+ | |
| Amazon Redshift Serverless 2.1+ | |
| Apache Druid | |
| Apache Druid 0.13+ | |
| Apache Druid 0.18+ | |
| Apache Hive 2.3+ | |
| Apache Hive 3.1.2+ | |
| Apache Spark 3+ | |
| ClickHouse | |
| Cloudera Impala 3.1+ | |
| Cloudera Impala 3.1+ with Native Driver | |
| Cloudera Impala with Native Driver | |
| DataVirtuality | |
| Databricks | |
| Denodo 7 | |
| Denodo 8 & 9 | |
| Dremio | |
| Dremio 11+ | |
| Exasol | |
| Google BigQuery Legacy SQL | |
| Google BigQuery Standard SQL | |
| Google Cloud AlloyDB for PostgreSQL | |
| Google Cloud PostgreSQL | |
| Google Cloud SQL | |
| Google Spanner | |
| Greenplum | |
| HyperSQL | |
| IBM Netezza | |
| MariaDB | |
| Microsoft Azure PostgreSQL | |
| Microsoft Azure SQL Database | |
| Microsoft Azure Synapse Analytics | |
| Microsoft SQL Server 2008+ | |
| Microsoft SQL Server 2012+ | |
| Microsoft SQL Server 2016 | |
| Microsoft SQL Server 2017+ | |
| MongoBI | |
| MySQL | |
| MySQL 8.0.12+ | |
| Oracle | |
| Oracle ADWC | |
| PostgreSQL 9.5+ | |
| PostgreSQL pre-9.5 | |
| PrestoDB | |
| PrestoSQL | |
| SAP HANA | |
| SAP HANA 2+ | |
| SingleStore | |
| SingleStore 7+ | |
| Snowflake | |
| Teradata | |
| Trino | |
| Vector | |
| Vertica |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-05 UTC.