Search code examples
azureazure-data-explorermaterialized-views

how to add more than one dimension table while creating a materialized view in Azure Data Explorer


I am trying to create a materialized view with 2 dimension tables, but getting error with the below syntax,

.create async materialized-view with (backfill=true, dimensionTables = 'SalesUserTable','ProductTable') SalesSummary on table PurchaseTable
{
PurchaseTable | join kind = inner SalesUserTable on $left.SalesUserId == $right.SalesUserID
| join kind = inner ProductTable on $left.ProductID == $right.ProductID
| extend TotalPrice = (Quantity*Price)
| summarize
TotalQuantity = sum(Quantity),
TotalPrice = sum(TotalPrice)
by SalesUserId, ProductID, SalesUserName=Name, ProductName=Name1
}

Please help me with the right syntax to add multiple dimension table


Solution

  • Put table names in a single set of quotes:

    .create async materialized-view with (backfill=true, dimensionTables = 'SalesUserTable, ProductTable') SalesSummary on table PurchaseTable