On this Page
Docs Menu

Go to Model Parameter List

This page refers to the case_sensitive parameter that is part of a model

case_sensitive can also be used as part of an explore, described here

case_sensitive can also be used as part of a dimension or filter field as described here


- case_sensitive: true
a boolean


case_sensitive determines whether filters will be treated as case sensitive for a given model. All filters related to the model are impacted, including those added in the Explore UI, Dashboard UI, a filter field, or a measure’s filters parameter.

The default value of case_sensitive is true, and case_sensitive accepts true or false.

case_sensitive works by adjusting the WHERE clause of the SQL that Looker generates. When case_sensitive: true, filters are expressed with = or LIKE, such as:

WHERE name = 'bob' WHERE name LIKE '%bob%'

When case_sensitive: false, filters are expressed with ILIKE (or equivalent), such as:

WHERE name ILIKE 'bob'

Most SQL dialects support case_sensitive. However, if your SQL dialect doesn’t support the case_sensitive parameter, case sensitivity will vary according to your database setup, which will usually not be case sensitive. Dialect support is listed below.


Make all filters case sensitive for a model:

- case_sensitive: true

Make all filters not case sensitive for a model:

- case_sensitive: false

Common Challenges

case_sensitive Is Not Supported By Some SQL Dialects

Looker’s ability to provide case_sensitive depends on the database dialect’s ability to support this functionality. The list below shows which dialects support case_sensitive in the most recent Looker release:

DataVirtuality provides a semantic data layer connecting to various database dialects. If Looker supports case_sensitive for the underlying dialects, then Looker supports case_sensitive for DataVirtuality connecting to those dialects.

Things to Know

You Can Create A Case Sensitive Search In MySQL

It is possible to create a case sensitive search in MySQL without using the case_sensitive parameter. In MySQL certain data types, called binary strings, store text as a series of numbers. The capitalization of the text makes a difference in the numbers that are used. Therefore, if you convert your text to a binary string, you can make searches that are case sensitive. For example:

- dimension: will_NOT_be_case_sensitive sql: ${TABLE}.something   - dimension: will_be_case_sensitive sql: CAST(${TABLE}.something AS BINARY)

Still have questions?
Go to Discourse - or - Email Support