Do I need to specify a 'type' for a field that has a 'case' in it?

Knowledge Drop

Last tested: Jan 21, 2019

The "case" parameter always returns a type "string". In other words, the generated SQL includes a cast to a string. Since the Looker default "type" is "string", there is no need to specify 'type: string' in a field that has a case. That being said, it is recommended that you specify 'type: string' for consistency of code.

This content is subject to limited support.                

Version history
Last update:
‎05-07-2021 09:49 AM
Updated by: