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

added support for expression and assert #74

Open HermansSven opened 1 year ago

HermansSven commented 1 year ago

This Pull Request provides a fix for the following issue:

Right now, the initialization of the Looker Project fails: proj = lookml.Project(path=project_path, )

This is because I have the following test:

test: airport_traffic_2020_aggregates {
  explore_source: airport_traffic {
      column: count {}
      filters: {
        field: airport_traffic.date_year
        value: "2020"
      }
  }
  assert: assert_count {
    expression: ${airport_traffic.count} = 8052 ;;
  }
}

This pull requests adds the support for the assert and expression keywords.