Added support for setting the RefreshType of individual tables in the configuration.
This commit is contained in:
parent
b6ed4a8506
commit
b4e4f52f96
@ -1,33 +1,37 @@
|
|||||||
{
|
{
|
||||||
"database": {
|
"database": {
|
||||||
"name": "AdventureWorksAggsProvider_PH",
|
"name": "AdventureWorksAggsProvider",
|
||||||
"tables": [
|
"tables": [
|
||||||
{
|
{
|
||||||
"name": "DimGeography",
|
"name": "DimGeography",
|
||||||
"mode": "DirectQuery"
|
"mode": "DirectQuery",
|
||||||
},
|
"refreshType": "Full"
|
||||||
{
|
},
|
||||||
"name": "DimCustomer",
|
{
|
||||||
"mode": "DirectQuery"
|
"name": "DimCustomer",
|
||||||
},
|
"mode": "DirectQuery",
|
||||||
{
|
"refreshType": "Full"
|
||||||
"name": "DimDate",
|
},
|
||||||
"mode": "DirectQuery"
|
{
|
||||||
},
|
"name": "DimDate",
|
||||||
{
|
"mode": "DirectQuery",
|
||||||
Products
|
"refreshType": "Full"
|
||||||
Getting things ready ...
|
},
|
||||||
"name": "DimProductSubcategory",
|
{
|
||||||
"mode": "DirectQuery"
|
"name": "DimProductSubcategory",
|
||||||
},
|
"mode": "DirectQuery",
|
||||||
{
|
"refreshType": "Full"
|
||||||
"name": "DimProductCategory",
|
},
|
||||||
"mode": "DirectQuery"
|
{
|
||||||
},
|
"name": "DimProductCategory",
|
||||||
{
|
"mode": "DirectQuery",
|
||||||
"name": "FactInternetSalesAgg",
|
"refreshType": "Full"
|
||||||
"mode": "DirectQuery"
|
},
|
||||||
}
|
{
|
||||||
]
|
"name": "FactInternetSalesAgg",
|
||||||
}
|
"mode": "DirectQuery",
|
||||||
|
"refreshType": "Full"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
@ -2,68 +2,74 @@
|
|||||||
"database": {
|
"database": {
|
||||||
"name": "AdventureWorksAggsProvider_PH",
|
"name": "AdventureWorksAggsProvider_PH",
|
||||||
"tables": [
|
"tables": [
|
||||||
{
|
{
|
||||||
"name": "DimGeography",
|
"name": "DimGeography",
|
||||||
"mode": "Dual"
|
"mode": "Dual",
|
||||||
},
|
"refreshType": "Full"
|
||||||
{
|
},
|
||||||
"name": "DimCustomer",
|
{
|
||||||
"mode": "Dual"
|
"name": "DimCustomer",
|
||||||
},
|
"mode": "Dual",
|
||||||
{
|
"refreshType": "Full"
|
||||||
"name": "DimDate",
|
},
|
||||||
"mode": "Dual"
|
{
|
||||||
},
|
"name": "DimDate",
|
||||||
{
|
"mode": "Dual",
|
||||||
"name": "DimProductSubcategory",
|
"refreshType": "Full"
|
||||||
"mode": "Dual"
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "DimProductSubcategory",
|
||||||
"name": "DimProductCategory",
|
"mode": "Dual",
|
||||||
"mode": "Dual"
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FactInternetSalesAgg",
|
"name": "DimProductCategory",
|
||||||
"mode": "Import",
|
"mode": "Dual",
|
||||||
"aggregationRules": [
|
"refreshType": "Full"
|
||||||
{
|
},
|
||||||
"aggTableColumn": "OrderDateKey",
|
{
|
||||||
"summarization": "GroupBy",
|
"name": "FactInternetSalesAgg",
|
||||||
"detailTable": "FactInternetSales",
|
"mode": "Import",
|
||||||
"detailTableColumn": "OrderDateKey"
|
"refreshType": "Full",
|
||||||
|
"aggregationRules": [
|
||||||
|
{
|
||||||
|
"aggTableColumn": "OrderDateKey",
|
||||||
|
"summarization": "GroupBy",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "OrderDateKey"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "CustomerKey",
|
"aggTableColumn": "CustomerKey",
|
||||||
"summarization": "GroupBy",
|
"summarization": "GroupBy",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "CustomerKey"
|
"detailTableColumn": "CustomerKey"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "ProductSubcategoryKey",
|
"aggTableColumn": "ProductSubcategoryKey",
|
||||||
"summarization": "GroupBy",
|
"summarization": "GroupBy",
|
||||||
"detailTable": "DimProduct",
|
"detailTable": "DimProduct",
|
||||||
"detailTableColumn": "ProductSubcategoryKey"
|
"detailTableColumn": "ProductSubcategoryKey"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "SalesAmount_Sum",
|
"aggTableColumn": "SalesAmount_Sum",
|
||||||
"summarization": "Sum",
|
"summarization": "Sum",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "SalesAmount"
|
"detailTableColumn": "SalesAmount"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "UnitPrice_Sum",
|
"aggTableColumn": "UnitPrice_Sum",
|
||||||
"summarization": "Min",
|
"summarization": "Min",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "UnitPrice"
|
"detailTableColumn": "UnitPrice"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "UnitPrice_Count",
|
"aggTableColumn": "UnitPrice_Count",
|
||||||
"summarization": "Count",
|
"summarization": "Count",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "UnitPrice"
|
"detailTableColumn": "UnitPrice"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,67 +2,73 @@
|
|||||||
"database": {
|
"database": {
|
||||||
"name": "AdventureWorksAggsProvider_PH",
|
"name": "AdventureWorksAggsProvider_PH",
|
||||||
"tables": [
|
"tables": [
|
||||||
{
|
{
|
||||||
"name": "DimGeography",
|
"name": "DimGeography",
|
||||||
"mode": "Dual"
|
"mode": "Dual",
|
||||||
},
|
"refreshType": "Full"
|
||||||
{
|
},
|
||||||
"name": "DimCustomer",
|
{
|
||||||
"mode": "Dual"
|
"name": "DimCustomer",
|
||||||
},
|
"mode": "Dual",
|
||||||
{
|
"refreshType": "Full"
|
||||||
"name": "DimDate",
|
},
|
||||||
"mode": "Dual"
|
{
|
||||||
},
|
"name": "DimDate",
|
||||||
{
|
"mode": "Dual",
|
||||||
"name": "DimProductSubcategory",
|
"refreshType": "Full"
|
||||||
"mode": "Dual"
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "DimProductSubcategory",
|
||||||
"name": "DimProductCategory",
|
"mode": "Dual",
|
||||||
"mode": "Dual"
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FactInternetSalesAgg",
|
"name": "DimProductCategory",
|
||||||
"mode": "Import",
|
"mode": "Dual",
|
||||||
"aggregationRules": [
|
"refreshType": "Full"
|
||||||
{
|
},
|
||||||
"aggTableColumn": "OrderDateKey",
|
{
|
||||||
"summarization": "GroupBy",
|
"name": "FactInternetSalesAgg",
|
||||||
"detailTable": "FactInternetSales",
|
"mode": "Import",
|
||||||
"detailTableColumn": "OrderDateKey"
|
"refreshType": "Full",
|
||||||
},
|
"aggregationRules": [
|
||||||
{
|
{
|
||||||
"aggTableColumn": "CustomerKey",
|
"aggTableColumn": "OrderDateKey",
|
||||||
"summarization": "GroupBy",
|
"summarization": "GroupBy",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "CustomerKey"
|
"detailTableColumn": "OrderDateKey"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "ProductSubcategoryKey",
|
"aggTableColumn": "CustomerKey",
|
||||||
"summarization": "GroupBy",
|
"summarization": "GroupBy",
|
||||||
"detailTable": "DimProduct",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "ProductSubcategoryKey"
|
"detailTableColumn": "CustomerKey"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "SalesAmount_Sum",
|
"aggTableColumn": "ProductSubcategoryKey",
|
||||||
"summarization": "Sum",
|
"summarization": "GroupBy",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "DimProduct",
|
||||||
"detailTableColumn": "SalesAmount"
|
"detailTableColumn": "ProductSubcategoryKey"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "UnitPrice_Sum",
|
"aggTableColumn": "SalesAmount_Sum",
|
||||||
"summarization": "Sum",
|
"summarization": "Sum",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "UnitPrice"
|
"detailTableColumn": "SalesAmount"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "FactInternetSales_Count",
|
"aggTableColumn": "UnitPrice_Sum",
|
||||||
"summarization": "CountTableRows",
|
"summarization": "Sum",
|
||||||
"detailTable": "FactInternetSales"
|
"detailTable": "FactInternetSales",
|
||||||
}
|
"detailTableColumn": "UnitPrice"
|
||||||
]
|
},
|
||||||
}
|
{
|
||||||
|
"aggTableColumn": "FactInternetSales_Count",
|
||||||
|
"summarization": "CountTableRows",
|
||||||
|
"detailTable": "FactInternetSales"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,30 +2,36 @@
|
|||||||
"database": {
|
"database": {
|
||||||
"name": "AdventureWorksAggsProvider_PH",
|
"name": "AdventureWorksAggsProvider_PH",
|
||||||
"tables": [
|
"tables": [
|
||||||
{
|
{
|
||||||
"name": "DimGeography",
|
"name": "DimGeography",
|
||||||
"mode": "DirectQuery"
|
"mode": "DirectQuery",
|
||||||
},
|
"refreshType": "Full"
|
||||||
{
|
},
|
||||||
"name": "DimCustomer",
|
{
|
||||||
"mode": "DirectQuery"
|
"name": "DimCustomer",
|
||||||
},
|
"mode": "DirectQuery",
|
||||||
{
|
"refreshType": "Full"
|
||||||
"name": "DimDate",
|
},
|
||||||
"mode": "DirectQuery"
|
{
|
||||||
},
|
"name": "DimDate",
|
||||||
{
|
"mode": "DirectQuery",
|
||||||
"name": "DimProductSubcategory",
|
"refreshType": "Full"
|
||||||
"mode": "DirectQuery"
|
},
|
||||||
},
|
{
|
||||||
{
|
"name": "DimProductSubcategory",
|
||||||
"name": "DimProductCategory",
|
"mode": "DirectQuery",
|
||||||
"mode": "DirectQuery"
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FactInternetSalesAgg",
|
"name": "DimProductCategory",
|
||||||
"mode": "DirectQuery"
|
"mode": "DirectQuery",
|
||||||
}
|
"refreshType": "Full"
|
||||||
]
|
},
|
||||||
|
{
|
||||||
|
"name": "FactInternetSalesAgg",
|
||||||
|
"mode": "DirectQuery",
|
||||||
|
"refreshType": "Full"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -66,6 +66,9 @@ namespace SetUpAggs
|
|||||||
[JsonProperty("mode")]
|
[JsonProperty("mode")]
|
||||||
public string Mode { get; set; }
|
public string Mode { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("refreshType")]
|
||||||
|
public string RefreshType { get; set; }
|
||||||
|
|
||||||
[JsonProperty("aggregationRules", NullValueHandling = NullValueHandling.Ignore)]
|
[JsonProperty("aggregationRules", NullValueHandling = NullValueHandling.Ignore)]
|
||||||
public AggregationRule[] AggregationRules { get; set; }
|
public AggregationRule[] AggregationRules { get; set; }
|
||||||
}
|
}
|
||||||
@ -411,7 +414,11 @@ namespace SetUpAggs
|
|||||||
{
|
{
|
||||||
Console.ForegroundColor = ConsoleColor.White;
|
Console.ForegroundColor = ConsoleColor.White;
|
||||||
Console.Write($"Refreshing table [{tableObj.Name}] ");
|
Console.Write($"Refreshing table [{tableObj.Name}] ");
|
||||||
tableObj.RequestRefresh(RefreshType.Full);
|
|
||||||
|
Table tableConfig = aggsConfig.Database.Tables.First(x => x.Name == tableObj.Name);
|
||||||
|
var refreshType = (RefreshType)Enum.Parse(typeof(RefreshType), tableConfig.RefreshType);
|
||||||
|
tableObj.RequestRefresh(refreshType);
|
||||||
|
|
||||||
Console.ForegroundColor = ConsoleColor.Green;
|
Console.ForegroundColor = ConsoleColor.Green;
|
||||||
Console.WriteLine("COMPLETE");
|
Console.WriteLine("COMPLETE");
|
||||||
}
|
}
|
||||||
|
@ -29,27 +29,33 @@ SetUpAggs.exe apply -Server asazure://server/instance -ConfigFile AggsConfig.jso
|
|||||||
"tables": [
|
"tables": [
|
||||||
{
|
{
|
||||||
"name": "DimGeography",
|
"name": "DimGeography",
|
||||||
"mode": "Dual"
|
"mode": "Dual",
|
||||||
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DimCustomer",
|
"name": "DimCustomer",
|
||||||
"mode": "Dual"
|
"mode": "Dual",
|
||||||
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DimDate",
|
"name": "DimDate",
|
||||||
"mode": "Dual"
|
"mode": "Dual",
|
||||||
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DimProductSubcategory",
|
"name": "DimProductSubcategory",
|
||||||
"mode": "Dual"
|
"mode": "Dual",
|
||||||
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DimProductCategory",
|
"name": "DimProductCategory",
|
||||||
"mode": "Dual"
|
"mode": "Dual",
|
||||||
|
"refreshType": "Full"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FactInternetSalesAgg",
|
"name": "FactInternetSalesAgg",
|
||||||
"mode": "Import",
|
"mode": "Import",
|
||||||
|
"refreshType": "Full",
|
||||||
"aggregationRules": [
|
"aggregationRules": [
|
||||||
{
|
{
|
||||||
"aggTableColumn": "OrderDateKey",
|
"aggTableColumn": "OrderDateKey",
|
||||||
|
Loading…
Reference in New Issue
Block a user