News for hackers. Stuff that matters.
Re:Introducing dbt + Materialize by glogla on Monday March 01, 2021 @04:41PM (#26308820)
At the moment, it does it by not allowing updates at all.

It also forbids some parts of SQL that could get you update-like functionality, like appending new versions of records to a stream and then running

    select * from (select *, row_number() over (partition by pk order by updated_at desc) from stream) where row_number = 1
or something.

(Boy I wish there was less awkward way to do this.)

EDIT: I'd love to ship bunch of data from few CDCs to Materialize and then run realtime reporting on that but without updates or window functions, Materialize can't do that just yet.

EDIT2: The part about updates isn't true, see below.

Re:Introducing dbt + Materialize by jldlaughlin on Monday March 01, 2021 @05:00PM (#26309028)
We (I work at Materialize) actually do support updates! Our CDC sources support them, as well as any source using an UPSERT envelope (more info here: https://materialize.com/docs/sql/create-source/text-kafka/#u...).

As per your second point, I have a less awkward way for you! Materialize supports a top-k idiom (https://materialize.com/docs/sql/idioms/#top-k-by-group) that is hopefully a bit more clear.

Re:Introducing dbt + Materialize by glogla on Monday March 01, 2021 @05:25PM (#26309298)
Right, I saw no update in the SQL keyword list, and saw some (I guess old now) talk about Materialize where the speaker mentioned no updates, sorry!
Re:Introducing dbt + Materialize by jldlaughlin on Monday March 01, 2021 @05:31PM (#26309371)
No apologies necessary, we're an active work in progress! (And, hopefully, moving quickly!)