looker-open-source / pylookml

A pythonic api for automatic lookml
https://pylookml.readthedocs.io/en/latest/introduction.html
MIT License
44 stars 22 forks source link

Error when dimension name includes numbers #43

Closed mariano-recurve closed 3 years ago

mariano-recurve commented 3 years ago

Hello, simple question, some of my database columns have numbers in their names and I've noticed lookml doesn't like them. Is this by design?

This works fine:

lookml.Dimension('dimension: street {}')

This gives an error:

lookml.Dimension('dimension: street1 {}')

Exception: dimension: street1 {} does not match a view: name {} or lookml name pattern
russlooker commented 3 years ago

I'll take a look at this this evening, believed I had permitted numbers in the regex validator. Will ping you here when I push a new version to pypi

russlooker commented 3 years ago

@marianoteehan it is now fixed in version 3.0.3 available in pip, run a quick upgrade. Thank you so much for logging this 👍

mariano-recurve commented 3 years ago

Thanks for the quick fix!