Knowledge Drop

What is Unit Testing/ Data Validator/ Data Tests/Results Validator?

  • 6 April 2021
  • 0 replies

Userlevel 3

Last Tested: Sep 24, 2019


All three of these names refer to the same feature, which is called “data tests” (formerly referred to as unit testing). This is a feature released as part of Looker 6, generally available on version 6.20.

This is essentially Unit testing for LookML, where you write a query, assert that the query’s result is expected! You can create data tests in model filesview files, or in separate, dedicated data test files.

Below is an example of implementation:

test: test_there_are_users { explore_source: users { column: count {} } assert: there_is_data { expression: ${users.count} > 100 ;; }}


More detail here:


This content is subject to limited support.                


0 replies

Be the first to reply!