Discussion about this post

User's avatar
Tristan Handy's avatar

I spoke to Lloyd a week ago about dbt models that could express their logic as Malloy! Way ahead of you :P

I have zero confidence that this will actually happen in some kind of near-term, but I say it just because I agree with you. I don't think dbt-as-a-framework should insist that you author your business logic in SQL, it's just that this was the best place to get started. Imperative languages like Python, languages-that-compile-to-SQL--all of these are reasonable ways to express business logic. It's just important that they can all execute in the cloud data platform and not require data movement. Ultimately it would be great if dbt-as-a-framework could understand the syntax of each of these expressions and use that knowledge to not just operate on your business logic as text (as it does today) but know exactly what you are expressing.

Lots and LOTS of work to do.

I do think that dbt's concept of a metric will allow you to do exactly what you're describing with the sales funnel though. We do not currently define a metric of type "funnel" but if you could describe how that should work we could--or you could--implement this (the metrics definitions themselves are all in user-space and all Apache 2.0). Define what a sales funnel is, configure as many of this type of metric as you please.

Expand full comment
Molham Aref's avatar

Great post Benn and thanks for the shoutout. There is a lot of power in the relational model that isn’t accessible via SQL. This is what inspired us at RelationalAI to work on a relational language and system to help people get further than they can get with SQL alone without having to give up the relational model and all its goodness. It’s also exciting to see Tristan write that dbt-as-a-framework has aspirations to support languages like Malloy. Malloy is a great example of a relational language that is not SQL. You can find many other cool and mind-blowing examples of relational languages at Jamie Brandon’s conference on HYTRADBOI (have you tried rubbing a database on it?).

Expand full comment
24 more comments...

No posts