Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
I have added a custom partitioning policy to some materialized views and tables like this:
.alter materialized-view DimResponse policy partitioning "{\"PartitionKeys\":[{\"ColumnName\":\"OrgId\",\"Kind\":\"Hash\",\"Properties\":{\"Function\":\"XxHash64\",\"MaxPartitionCount\":128,\"Seed\":1,\"PartitionAssignmentMode\":\"Uniform\"}}],\"EffectiveDateTime\":\"2023-01-01T00:00:00.000000Z\",\"MinRowCountPerOperation\":0,\"MaxRowCountPerOperation\":0,\"MaxOriginalSizePerOperation\":0}"I have connected to source control, but in DatabaseSchema.kql, the policy is not in the schema, is this a limitation or a bug?
My update policies are applied in the DatabaseSchema.kql, so something is working when altering materialized views and tables.
Solved! Go to Solution.
Hi @mra1,
This is expected today: the Git-exported DatabaseSchema.kql doesn’t include partitioning policies. Keep them in a separate “post-deploy” script and apply them during deployment. You can retrieve the current policy with .show … policy partitioning and re-apply with .alter … policy partitioning. See the policy and command docs here: Partitioning policy, .alter table policy partitioning, .alter materialized-view policy partitioning, and for validation .show database extents partitioning statistics.
Why this happens
Git integration for Eventhouse/KQL DB focuses DatabaseSchema.kql on schema entities (tables, MVs, functions) and some policies (like update). Partitioning is a storage/engine policy and isn’t emitted into that file today, so it won’t show up even if it’s active.
Recommended pattern (works for tables and MVs)
// Table
.show table DimResponse policy partitioning
// Materialized view
.show materialized-view DimResponse policy partitioning
.show database extents partitioning statisticsRef: command reference.
// Table
.alter table DimResponse policy partitioning
{
"PartitionKeys": [
{
"ColumnName": "OrgId",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 128,
"Seed": 1,
"PartitionAssignmentMode": "Uniform"
}
}
],
"EffectiveDateTime": "2023-01-01T00:00:00Z",
"MinRowCountPerOperation": 0,
"MaxRowCountPerOperation": 0,
"MaxOriginalSizePerOperation": 0
}
// Materialized view
.alter materialized-view DimResponse policy partitioning
{
"PartitionKeys": [
{
"ColumnName": "OrgId",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 128,
"Seed": 1,
"PartitionAssignmentMode": "Uniform"
}
}
],
"EffectiveDateTime": "2023-01-01T00:00:00Z"
}
Command refs: alter table policy partitioning, alter materialized-view policy partitioning.
Notes and tips
- Only use partitioning where it helps (high-cardinality/equality filters or heavy joins on the key).
- Verify progress and coverage with: show database extents partitioning statistics.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Hi @mra1,
This is expected today: the Git-exported DatabaseSchema.kql doesn’t include partitioning policies. Keep them in a separate “post-deploy” script and apply them during deployment. You can retrieve the current policy with .show … policy partitioning and re-apply with .alter … policy partitioning. See the policy and command docs here: Partitioning policy, .alter table policy partitioning, .alter materialized-view policy partitioning, and for validation .show database extents partitioning statistics.
Why this happens
Git integration for Eventhouse/KQL DB focuses DatabaseSchema.kql on schema entities (tables, MVs, functions) and some policies (like update). Partitioning is a storage/engine policy and isn’t emitted into that file today, so it won’t show up even if it’s active.
Recommended pattern (works for tables and MVs)
// Table
.show table DimResponse policy partitioning
// Materialized view
.show materialized-view DimResponse policy partitioning
.show database extents partitioning statisticsRef: command reference.
// Table
.alter table DimResponse policy partitioning
{
"PartitionKeys": [
{
"ColumnName": "OrgId",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 128,
"Seed": 1,
"PartitionAssignmentMode": "Uniform"
}
}
],
"EffectiveDateTime": "2023-01-01T00:00:00Z",
"MinRowCountPerOperation": 0,
"MaxRowCountPerOperation": 0,
"MaxOriginalSizePerOperation": 0
}
// Materialized view
.alter materialized-view DimResponse policy partitioning
{
"PartitionKeys": [
{
"ColumnName": "OrgId",
"Kind": "Hash",
"Properties": {
"Function": "XxHash64",
"MaxPartitionCount": 128,
"Seed": 1,
"PartitionAssignmentMode": "Uniform"
}
}
],
"EffectiveDateTime": "2023-01-01T00:00:00Z"
}
Command refs: alter table policy partitioning, alter materialized-view policy partitioning.
Notes and tips
- Only use partitioning where it helps (high-cardinality/equality filters or heavy joins on the key).
- Verify progress and coverage with: show database extents partitioning statistics.
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Turn streaming data into instant insights with Microsoft Fabric. Learn to connect live sources, visualize in seconds, and use Copilot + AI for smarter decisions.