I am trying to create a prejoin projection from two table which my query can access.
I have joined two table using a inner join but my requirement is to get a unique row for every combination, for now for every combination I can see more then one value after the join statement.
I tried doing this using the row_number function with windows partition by clause as subquery and filtering the records with rank 1.
But when I use it in creating a prejoin projection it says "subqueries not allowed inside a projection definition"
What can we do here to build this projections
Besides this:
- Do we have materialized views in Vertica which can be used instead of projections.
- How can we validate a prejoin projection has only unique data for a specific combination of key columns.
- What happens to prejoin projections when the data gets updated or inserted in the base table.