Dimension/Measure/Parameter Naming Conventions

PaulM1
New Member

Can anyone share some pros & cons for using CamelCase vs lower_case for naming Dimensions, Measures, and Parameters? For example:

  dimension: CreatedDate {
    label: "Created Date"
    type: number
    sql: ${TABLE}.CreatedDate ;;
  }

Or:

  dimension: created_date {
    label: "Created Date"
    type: number
    sql: ${TABLE}.CreatedDate ;;
  }

I feel like I would like to standardize our LookML using CamelCase. But I would definitely like to hear from any veterans out there. TIA!

0 2 566
2 REPLIES 2

To me it’s always easier to read words where there’s some kind of a gap between them.

Looker UI will replace the underscore with space and capitalise the words if you don’t use label but if you use labels anyway, it’s much more about your preference.

I have been writing code for more than a decade and prefer lowercase everywhere apart from SQL and since LookML feels to be more like a back-end language that’s what I apply

I agree with @Dawid that it’s pretty much about your preference 👍

To me, if your database columns are named like how you have it in your example, CreatedDate, then I think I’d prefer the dimensions, measures, parameters, etc. to be named the same way, rather than created_date.

Top Labels in this Space
Top Solution Authors