sqlmesh
sqlmesh copied to clipboard
Add model's latest variable
Add a variable that can be used to access a specific model's latest interval.
Ex: I have db.user
model. To access latest date string I would do:
WHERE
ds = @DB__USER__LATEST_DS
The key concept is that latest
is local to each model and therefore if you want to access a table that has history of values on it and you always want "latest" then you can use this variable.