Canner / WrenAI

🚀 An open-source SQL AI (Text-to-SQL) Agent that empowers data, product teams to chat with their data. 🤘
https://getwren.ai/oss
GNU Affero General Public License v3.0
2.04k stars 211 forks source link

Availability to update MDL file to design semantic model instead of using UI modeling page #630

Open Candytigers opened 2 months ago

Candytigers commented 2 months ago

Is your feature request related to a problem? Please describe. When I try to design semantic model in the modeling page in UI, I found the limitation of creating complex calcuated field(e.g. only one expression and one column is supported to create new calculated field in UI) and more efforts are needed when we have lots of columns and relationships to define.

Describe the solution you'd like A clear and concise description of what you want to happen.

Could we have the flexibility of updating the underlying mdl file and implement it directly instead of using the UI modeling page? For example, if I want to create a new calculated filed called 'total_sales_quantity_last_year', can I do it by updating mdl file which could be relected to semantic modeling and used in AI service:

{ "name" : "total_sales_quantity_last_year", "type" : "INT64", "isCalculated" : true, "notNull" : false, "expression" : "lag(sales.quantify,1) over (partition by product.product_name order by date_trunc("YEAR",sales_date) asc)", "properties" : { "description" : "" }

Currently, I am able to find the mdl file in Docker files under Wren Engine, but when I try to edit and save it, it seems the updates don't reflect to the modeling page in UI.