Forum Discussion
Issue creating a KQL materialized view
- Anonymous1 year ago
Hi pmscorca ,
It might have seemed like the `async` keyword wasn't required, but for backfill operations, it is mandatory to ensure the process runs in the background without blocking other operations.
When you use the `.create async materialized-view` command, an `OperationId` is generated. You can monitor the progress of this operation using the `.show operations` command. If the materialized view doesn't appear immediately, it might still be processing, especially if the dataset is large.
Here's a step-by-step approach to troubleshoot and resolve your issues:
1. Verify Async Creation:
```kql .create async materialized-view with (backfill=true) mymaterview on table mytable { mytable | summarize arg_max(Timestamp, *) by KeyColumn } ```2. Monitor the Operation:
```kql .show operations ```3. Make sure the new materialized view name is unique and doesn't conflict with other database objects.
Create materialized view - Kusto | Microsoft Learn
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Although i was able to create the materialised view, i was not able to backfill the data , even after specifying the effectivedatetime and lookup.
Here is my query
.create async materialized-view with (backfill=true, effectiveDateTime=datetime(1970-01-01), Lookback: "30.00:00:00")
<viewName> on table <tableName>
{
<tableName>
| summarize hint.strategy=shuffle arg_max(DateTime, c1, c2, c3) by Id
}
it just backfills only for a day instead of 30 days data present in the table in kusto