The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have below code and want to create a Materialized View for it:
Solved! Go to Solution.
Hello @Anonymous
the Spark SQL engine in Fabric Lakehouse does not recognize the materialized view syntax. In Microsoft Fabric, while materialized views exist, they are not created using the standard Spark SQL statement. Instead, materialized views in Fabric are designed to be created through a KQL-based interface
in kusto query:
.create materialized-view [ifnotexists] <ViewName> on table <SourceTable>
{
// Your summarize-based aggregation query here
}
use %kusto magic command
if this is helpful please accept the solution
First of all I would remove one of the equal signs in the WHERE clause, to make it read "month = 'Apr'". Does the error still persist after that?
Hello @Anonymous
the Spark SQL engine in Fabric Lakehouse does not recognize the materialized view syntax. In Microsoft Fabric, while materialized views exist, they are not created using the standard Spark SQL statement. Instead, materialized views in Fabric are designed to be created through a KQL-based interface
in kusto query:
.create materialized-view [ifnotexists] <ViewName> on table <SourceTable>
{
// Your summarize-based aggregation query here
}
use %kusto magic command
if this is helpful please accept the solution
User | Count |
---|---|
6 | |
2 | |
2 | |
2 | |
2 |
User | Count |
---|---|
20 | |
18 | |
6 | |
5 | |
4 |