In StarRocks 3.5, Can I create a ASYNC mat view (a...
# questions-and-troubleshooting
s
In StarRocks 3.5, Can I create a ASYNC mat view (auto-refreshed) over an iceberg table? I do not see any
auto - refresh
limitation on docs but whenever I try to create it, I'm getting error like:
Materialized view which type is ASYNC need to specify refresh interval for external table
Sample query:
Copy code
CREATE MATERIALIZED VIEW playground.qa_audit_trail_mv_2
PARTITION BY date_trunc('day', history_date)
REFRESH ASYNC
AS
SELECT
    changes,
    history_id,
    history_date,
    history_type
FROM iceberg.qa_data_lake.qa_audit_trail
WHERE history_date >= date_sub(now(), INTERVAL 7 DAY);
r
In this case (external tables), you have to mention how often you refresh it your MV e.g.
Copy code
async refresh every (interval 1 day)
s
I would like if refresh without a fixed interval can be achieved, like how it's done for native tables. I've raised an issue as well: https://github.com/StarRocks/starrocks/issues/63814