jan_soubusta
01/20/2023, 8:28 AMthomas_briggs
01/20/2023, 1:55 PMthomas_briggs
01/20/2023, 1:56 PMthomas_briggs
01/20/2023, 1:57 PMjan_soubusta
01/20/2023, 2:06 PM-- Rows to be updated
SELECT ... FROM raw
WHERE raw.id IN ( SELECT id FROM target)
AND raw.last_updated > ( SELECT max(last_updated) FROM target )
You can design indexes/... in target
in dbt.
But you would have to design indexes/... in raw
manually after first load, which is dangerous, because e.g. when you decide to replicate the solution in a different infra (e.g. new region), you easily forget to apply the manual optimizations š
In GoodData, we implemented custom loaders in the past.
We allowed users to define (in a declarative way) such optimizations per table.
However, we had to do it only for Vertica š
Generally, it makes sense to allow specifying the following features:
⢠Indexes in standard OLTP-like DBs
⢠Clustering, sort columns, ... in clustered columnar MPP DBs
⢠Partitioningthomas_briggs
01/20/2023, 2:18 PMthomas_briggs
01/20/2023, 2:20 PMthomas_briggs
01/20/2023, 2:24 PMthomas_briggs
01/20/2023, 2:24 PM