-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
code/DeltaKustoAdxIntegrationTest/Policies/Partitioning/PartitioningPolicyTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using DeltaKustoIntegration.Database; | ||
using DeltaKustoLib.CommandModel; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.Immutable; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace DeltaKustoAdxIntegrationTest.Policies.Partitioning | ||
{ | ||
public class PartitioningPolicyTest : AdxAutoIntegrationTestBase | ||
{ | ||
protected override string StatesFolderPath => "Policies/Partitioning"; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
code/DeltaKustoAdxIntegrationTest/Policies/Partitioning/States/another-policy.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int) | ||
|
||
.alter table MyPartitioningTable policy partitioning ``` | ||
{ | ||
"PartitionKeys": [ | ||
{ | ||
"ColumnName": "TenantId", | ||
"Kind": "Hash", | ||
"Properties": { | ||
"Function": "XxHash64", | ||
"MaxPartitionCount": 32, | ||
"PartitionAssignmentMode": "Uniform" | ||
} | ||
} | ||
] | ||
}``` |
4 changes: 4 additions & 0 deletions
4
code/DeltaKustoAdxIntegrationTest/Policies/Partitioning/States/empty.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Random comment | ||
|
||
.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int) | ||
|
16 changes: 16 additions & 0 deletions
16
code/DeltaKustoAdxIntegrationTest/Policies/Partitioning/States/one-policy.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int) | ||
|
||
.alter table MyPartitioningTable policy partitioning ``` | ||
{ | ||
"PartitionKeys": [ | ||
{ | ||
"ColumnName": "TenantId", | ||
"Kind": "Hash", | ||
"Properties": { | ||
"Function": "XxHash64", | ||
"MaxPartitionCount": 128, | ||
"PartitionAssignmentMode": "Uniform" | ||
} | ||
} | ||
] | ||
}``` |
37 changes: 37 additions & 0 deletions
37
code/DeltaKustoAdxIntegrationTest/Policies/Partitioning/States/two-policy.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.create table MyPartitioningTable(TIMESTAMP: datetime, TenantId:string, Level: int) | ||
|
||
.alter table MyPartitioningTable policy partitioning | ||
``` | ||
{ | ||
"PartitionKeys": [ | ||
{ | ||
"ColumnName": "TenantId", | ||
"Kind": "Hash", | ||
"Properties": { | ||
"Function": "XxHash64", | ||
"MaxPartitionCount": 128, | ||
"PartitionAssignmentMode": "Uniform" | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
.create table MyPartitioningTable2(Id:string) | ||
|
||
.alter table MyPartitioningTable2 policy partitioning | ||
``` | ||
{ | ||
"PartitionKeys": [ | ||
{ | ||
"ColumnName": "Id", | ||
"Kind": "Hash", | ||
"Properties": { | ||
"Function": "XxHash64", | ||
"MaxPartitionCount": 128, | ||
"PartitionAssignmentMode": "Uniform" | ||
} | ||
} | ||
] | ||
} | ||
``` |