looker-open-source / pylookml

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

Fields named `name` are dropped after the file is parsed #62

Open brunocostalopes opened 3 years ago

brunocostalopes commented 3 years ago

I noticed that when one of the views includes a field name name, the field gets dropped after the view is parsed.

Here's a simplified script that shows the problem:

view_lookml = """
view: dim_test {

  sql_table_name: dim_test;;

  dimension: name {
    type: string
    sql: ${TABLE}."NAME" ;;
  }

}
"""
view = lookml.View(view_lookml)
print(view)

And the output of this script is the following:

view: dim_test {
  sql_table_name: dim_test ;;
}