by tdfirth on 3/8/24, 3:10 PM with 6 comments
We wanted to write abstractions so that we could reuse code. We wanted to bundle those abstractions into libraries. We wanted to statically analyze our models so that we caught more errors before production. We wanted a fast unit test suite that you could iterate on locally without connecting to a data warehouse.
In short, we wanted to use all the same practices we used for building our other software. Tools like dbt made a great start at importing these kinds of practices into analytics, but there are many great aspects of the software engineering workflow that still aren't easy to replicate in data.
We've found it to be a super productive way to work, and we thought others might want to use it too. It's very early days so we've put up a page for to explain it, and we've made some executable examples for people to have a go. Let us know what you think!
FAQ:
Is NASTY an ORM? A SQL builder?
Neither! NASTY is kinda it's own thing. NASTY is more like a minimal relational algebra programming language shipped as a Typescript library. It borrows a bunch of learnings from other programming languages and applies them to OLAP programming / data engineering. It's an important distinction, because it totally changes the way you can think about building transformations.
Why TypeScript? Why not Python?
The 100% honest answer is we had a ton of typescript experience and we had a node/react app with pulumi's TS apis. We like typescript and by being a library instead of a full programming language, we can leverage things like vitest, eslint, node, TS's language server, TSdoc, etc.
by cotera-grant on 3/8/24, 5:44 PM
One thing that's on the getnasty.dev but worth calling out explicitly with the link are the ruby koans style TDD learn by examples we have for NASTY. They should just require NodeJS in whatever form is easiest.
https://github.com/coterahq/learn-nasty-by-example
Another small but interesting thing that I think people who work in SQL would find cool are `invariants`, which do runtime data integrity checks
by gigatexal on 3/8/24, 8:19 PM
by zurawiki on 3/8/24, 5:14 PM
I selfishly hope this can smooth over all the missing SQL functionality in redshift
Very cool work team!
by statueofibberty on 3/8/24, 5:31 PM