When would I use the | symbol after the sql parameter in old LookML?

Knowledge Drop

Last tested: Feb 20, 2018
 

The pipe | symbol is only used in old LookML. It tells the validator that multiple lines of code are coming. This has been replaced in New LookML with the ability to use double semicolons to end code blocks like html or SQL.

 

# Example of | used correctly. Without the |, this would error.

sql: |

CASE WHEN 1=1

THEN 'grand'

ELSE 'not as grand'

END

More examples: https://oldlookmldocs.looker.com/reference/view-params/sql-for-derived_table

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 01:12 PM
Updated by: