Company
Date Published
Author
Igor Lukanin
Word count
583
Language
English
Hacker News points
None

Summary

Python can now be used for data modeling in Cube, providing a Python-only experience with configuration or authoring dynamic data models using YAML and Jinja. The support of YAML syntax for data modeling was introduced almost a year ago, but pure YAML lacked the dynamicity of JavaScript. With the current update, YAML data models are put on par with JavaScript ones, allowing users to organize their code, add dynamicity, and use programming techniques of their preference. Jinja is now supported as a template engine, and Python can be used to define dynamic data models in YAML, giving users the option to write some or most of their logic in Python and then render the result in YAML. The Cube team recommends using YAML by default and adding Jinja and Python for dynamic data models as needed. The support for Python comes with the Cube Core v0.34 release, and users can get started today in Cube Cloud or with Cube Core, although macOS on M1/M2 and Windows are not supported yet.