I have tried the below code:
CREATE TABLE TABLE_COUNT_TC AS(
SELECT t.table_name AS table_name,
SUM(ps.row_count) AS row_count,
CURRENT_DATE AS Record_Date
FROM tables t
JOIN projections p ON t.table_id = p.anchor_table_id
JOIN projection_storage ps on p.projection_name = ps.projection_name
GROUP BY t.table_name,ps.row_count
);
This code is giving multiple lines for one table and they are not the raw tables. They are the tables that are created in transformations.
Can anyone have idea on the above query?
Thanks,
Supriya.