Knowledge Drop

What's the longest allowed filter? Is there a limit on characters or values?

  • 5 April 2021
  • 0 replies

Userlevel 5
  • Looker Staff
  • 172 replies

Last tested: March 2021


In the Looker product/code, there are no maximums on filter values or length. Theoretically, you can enter as many as you want. However, Looker uses Puma, which limits the url characters to 10240 (source: Puma Code).

In the browser, a long URL can break the browser. Stackoverflow cites ~2,000 characters as the lowest limit for a browser (IE/Edge). All other browsers support URLs with > 8000 characters. As long as the URL is hashed (like in an explore), this is not a problem, but dashboard filters are simply added to the URL at the time of this writing. These problems can be solved by putting the values into a yesno dimension and filtering on that. An example:

dimension: id_matches_value_list { type: yesno sql: ${id} IN (value1, value2, ... );; }

In the database, there is usually a limit on query length, which is relevant since the filters usually go into the WHERE clause. A common limit is 2^16 characters (65336). There's no known workaround for this.


This content is subject to limited support.                

0 replies

Be the first to reply!