For context, I am running Spark on databricks platform and using Delta Tables (s3).
Let's assume we a table called table_one. I create a view called view_one using the table and then call view_one. Next, I create another view, called view_two based on view_one and then call view_two. Will all the calculations be done again for view_one.
Example commands are below i.e. when cmd4 is called, will cmd1 be re-executed to calculate cmd4?
Cmd1:
CREATE OR REPLACE VIEW_ONE FROM
SELECT
....
FROM
table_one
WHERE
.....
Cmd2:
SELECT * FROM VIEW_ONE;
Cmd3:
CREATE OR REPLACE VIEW VIEW_TWO AS
SELECT
....
FROM
VIEW_ONE
WHERE
.....;
Cmd4:
SELECT * FROM VIEW_TWO;