514-labs / moose

The developer framework for your data & analytics stack
https://www.moosejs.com
MIT License
21 stars 4 forks source link

Allow user to specify target table version #1110

Closed linear[bot] closed 2 weeks ago

linear[bot] commented 3 weeks ago

A materialized view query is like this:

CREATE MATERIALIZED VIEW <viewname>
TO <targettablename_version>
AS SELECT ... FROM <sourcetablename_version> ...

Their aggregation file only contains the SELECT clause though. We take that string and append it to the create query. That means they can't specify the TO . Currently, it's slightly magical because we assume the target table is the same name as the aggregation file, and we always assume the latest version (whatever version is in package.json). But what if the target table is not on the latest version?

E.g. they have Source & Target data models. They both start out at 0.0. They make a change to Source model, bump version. So now Source is at 0.1, but Target is still at 0.0.

linear[bot] commented 3 weeks ago

514-910 Allow user to specify target table version