Can we create Materialized view n exsting view and table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2024 11:44 AM
Dear All,
Is it possible to create Materialized view on view and table (Joining view and table)?
I suspect it is not possible. Please suggest.
Also please provide best way to schedule the refresh of Materialized view.
Regards,
Surya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2024 12:38 PM
Hello @sboxi
Can you try with this, as it looks it is possible, also about scheduling, please refer to below documentation you can use SCHEDULE clause.
CREATE MATERIALIZED VIEW IF NOT EXISTS my_materialized_view AS
SELECT
t.column1,
v.column2,
AVG(t.column3) AS avg_column3
FROM
my_table t
INNER JOIN
my_view v
ON
t.id = v.id
GROUP BY
t.column1, v.column2;
https://docs.databricks.com/ja/sql/language-manual/sql-ref-syntax-ddl-create-materialized-view.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 01:41 AM
Thanks @Alberto_Umana . I will try that.

