When writing SQL in your Lightdash models, you can use the following references to template you SQL and make it more reusable
${field}
- reference a field in the current model${model.field}
- reference a field in another model${TABLE}
- reference the current table’s sql reference${lightdash.attributes.my_attr_1}
- a user attribute called my_attr_1
ld
as an alias for lightdash
attribute
or attr
as an alias for attributes
${lightdash.user.<intrinsic_attribute>}
- reference an intrinsic_attribute
of the current Lightdash user
ld
as an alias for lightdash
email