Skip to content

Commit d16a764

Browse files
committed
optimize docs for View and MV
Signed-off-by: jaogoy <jaogoy@gmail.com>
1 parent e6b2825 commit d16a764

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

docs/integrations/engines/starrocks.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ MODEL (
424424

425425
### Views
426426

427-
StarRocks supports view `SECURITY` via `physical_properties.security`.
427+
StarRocks supports view `SECURITY` via **`virtual_properties`**.`security`.
428428

429429
**Syntax:**
430430

@@ -434,7 +434,7 @@ StarRocks supports view `SECURITY` via `physical_properties.security`.
434434
MODEL (
435435
name user_summary_view,
436436
kind VIEW,
437-
physical_properties (
437+
virtual_properties (
438438
security = INVOKER
439439
)
440440
);
@@ -451,12 +451,15 @@ GROUP BY user_id;
451451

452452
SQLMesh uses `kind VIEW (materialized true)` to create materialized views.
453453

454-
You can specify StarRocks MV refresh settings using the same `physical_properties` block.
454+
For ASYNC MVs, StarRocks requires a `REFRESH` clause, so you must specify **at least one** of `refresh_moment` or `refresh_scheme`.
455+
456+
MV properties (including `refresh_moment` / `refresh_scheme` and other table-like properties such as partitioning, distribution, ordering, and generic properties) must be specified in **`physical_properties`**.
455457

456458
**Refresh properties:**
457459

458460
* `refresh_moment`: `IMMEDIATE` or `DEFERRED` (optional)
459461
* `refresh_scheme`: `MANUAL` or `ASYNC ...` (optional)
462+
* If you specify it with the `START/EVERY`, you must specify it as a whole string, quoted by a pair of quotes.
460463
* Examples: `ASYNC`, `MANUAL`, `ASYNC START ("2024-01-01 00:00:00") EVERY (INTERVAL 5 MINUTE)`
461464
* The syntax of `ASYNC ...` clause is the same as the clause in StarRocks.
462465

@@ -502,7 +505,7 @@ target_columns_to_types = {
502505

503506
## Limitations
504507

505-
* **No sync MV support (currently)**: synchronous materialized views are not supported yet.
508+
* **No SYNC MV support**: synchronous materialized views are not supported yet.
506509
* **No tuple IN**: StarRocks does not support `(c1, c2) IN ((v1, v2), ...)`.
507510
* **No `SELECT ... FOR UPDATE`**: StarRocks is an OLAP database and does not support row locks; SQLMesh removes `FOR UPDATE` when executing SQLGlot expressions.
508511
* **RENAME caveat**: `ALTER TABLE db.old RENAME db.new` is not supported; the `RENAME` target cannot be qualified with a database name.

0 commit comments

Comments
 (0)