Question

Broken Looks due to field name change

  • 29 January 2015
  • 2 replies
  • 323 views

I just changed a few field names in my model to reflect some business logic changes and now everyone in my company who relied on Looks and dashboards that used those fields are broken. Is there anything I can do to bulk edit others’ looks to fix this?


2 replies

Userlevel 3

You can use the alias feature in LookML to make sure your fields are backward compatible. For example:


- dimension: total_revenue_excl_amt
alias: total_revenue
sql: ${total_revenue}

This will use the total_revenue_excl_amt dimension wherever a Look tries to use total_revenue.


And we’re working on better ways to combat model rot and schema change!

Userlevel 2

Yes, you can change the name of the field without deploying to production, then run the Look Validator. Be sure ‘Group by’ is set to ‘Error’. Now you can do click ‘Replace or Remove Field’ and put in the new fully-qualified field name, in order to do a bulk change for that field.


But for queries that people haven’t saved as Looks, this isn’t going to help.

Reply