Added documentation and more example configuration files.
This commit is contained in:
parent
94a22ea210
commit
21b7d4a90d
@ -24,7 +24,7 @@
|
|||||||
<DeploymentOptionADALCache>Default</DeploymentOptionADALCache>
|
<DeploymentOptionADALCache>Default</DeploymentOptionADALCache>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == '' ">
|
<PropertyGroup Condition=" '$(Configuration)' == '' ">
|
||||||
<DeploymentServerName>asazure://aspaastest14.asazure-int.windows.net/sukanyasaltsrc1</DeploymentServerName>
|
<DeploymentServerName>localhost\SQL2016</DeploymentServerName>
|
||||||
<DeploymentServerEdition>Developer</DeploymentServerEdition>
|
<DeploymentServerEdition>Developer</DeploymentServerEdition>
|
||||||
<DeploymentServerVersion>Unknown</DeploymentServerVersion>
|
<DeploymentServerVersion>Unknown</DeploymentServerVersion>
|
||||||
<DeploymentServerDatabase>AdventureWorksAggs</DeploymentServerDatabase>
|
<DeploymentServerDatabase>AdventureWorksAggs</DeploymentServerDatabase>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<DeploymentOptionQueryImpersonation>Default</DeploymentOptionQueryImpersonation>
|
<DeploymentOptionQueryImpersonation>Default</DeploymentOptionQueryImpersonation>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == '' ">
|
<PropertyGroup Condition=" '$(Configuration)' == '' ">
|
||||||
<DeploymentServerName>asazure://aspaastest14.asazure-int.windows.net/sukanyasaltsrc1</DeploymentServerName>
|
<DeploymentServerName>localhost\SQL2016</DeploymentServerName>
|
||||||
<DeploymentServerEdition>Developer</DeploymentServerEdition>
|
<DeploymentServerEdition>Developer</DeploymentServerEdition>
|
||||||
<DeploymentServerVersion>Unknown</DeploymentServerVersion>
|
<DeploymentServerVersion>Unknown</DeploymentServerVersion>
|
||||||
<DeploymentServerDatabase>AdventureWorksAggsProvider</DeploymentServerDatabase>
|
<DeploymentServerDatabase>AdventureWorksAggsProvider</DeploymentServerDatabase>
|
||||||
|
@ -4,70 +4,29 @@
|
|||||||
"tables": [
|
"tables": [
|
||||||
{
|
{
|
||||||
"name": "DimGeography",
|
"name": "DimGeography",
|
||||||
"mode": "Dual"
|
"mode": "DirectQuery"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DimCustomer",
|
"name": "DimCustomer",
|
||||||
"mode": "Dual"
|
"mode": "DirectQuery"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DimDate",
|
"name": "DimDate",
|
||||||
"mode": "Dual"
|
"mode": "DirectQuery"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Products
|
||||||
|
Getting things ready ...
|
||||||
"name": "DimProductSubcategory",
|
"name": "DimProductSubcategory",
|
||||||
"mode": "Dual"
|
"mode": "DirectQuery"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DimProductCategory",
|
"name": "DimProductCategory",
|
||||||
"mode": "Dual"
|
"mode": "DirectQuery"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FactInternetSalesAgg",
|
"name": "FactInternetSalesAgg",
|
||||||
"mode": "Import",
|
"mode": "DirectQuery"
|
||||||
"aggregationRules": [
|
|
||||||
{
|
|
||||||
"aggTableColumn": "OrderDateKey",
|
|
||||||
"summarization": "GroupBy",
|
|
||||||
"detailTable": "FactInternetSales",
|
|
||||||
"detailTableColumn": "OrderDateKey"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"aggTableColumn": "CustomerKey",
|
|
||||||
"summarization": "GroupBy",
|
|
||||||
"detailTable": "FactInternetSales",
|
|
||||||
"detailTableColumn": "CustomerKey"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"aggTableColumn": "ProductSubcategoryKey",
|
|
||||||
"summarization": "GroupBy",
|
|
||||||
"detailTable": "DimProduct",
|
|
||||||
"detailTableColumn": "ProductSubcategoryKey"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"aggTableColumn": "SalesAmount_Sum",
|
|
||||||
"summarization": "Sum",
|
|
||||||
"detailTable": "FactInternetSales",
|
|
||||||
"detailTableColumn": "SalesAmount"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"aggTableColumn": "UnitPrice_Sum",
|
|
||||||
"summarization": "Min",
|
|
||||||
"detailTable": "FactInternetSales",
|
|
||||||
"detailTableColumn": "UnitPrice"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"aggTableColumn": "UnitPrice_Count",
|
|
||||||
"summarization": "Count",
|
|
||||||
"detailTable": "FactInternetSales",
|
|
||||||
"detailTableColumn": "UnitPrice"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"aggTableColumn": "FactInternetSales_Count",
|
|
||||||
"summarization": "CountTableRows",
|
|
||||||
"detailTable": "FactInternetSales"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
69
SetUpAggs/AggsConfig_SetAggs1.json
Normal file
69
SetUpAggs/AggsConfig_SetAggs1.json
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"name": "AdventureWorksAggsProvider_PH",
|
||||||
|
"tables": [
|
||||||
|
{
|
||||||
|
"name": "DimGeography",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimCustomer",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimDate",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimProductSubcategory",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimProductCategory",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "FactInternetSalesAgg",
|
||||||
|
"mode": "Import",
|
||||||
|
"aggregationRules": [
|
||||||
|
{
|
||||||
|
"aggTableColumn": "OrderDateKey",
|
||||||
|
"summarization": "GroupBy",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "OrderDateKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "CustomerKey",
|
||||||
|
"summarization": "GroupBy",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "CustomerKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "ProductSubcategoryKey",
|
||||||
|
"summarization": "GroupBy",
|
||||||
|
"detailTable": "DimProduct",
|
||||||
|
"detailTableColumn": "ProductSubcategoryKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "SalesAmount_Sum",
|
||||||
|
"summarization": "Sum",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "SalesAmount"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "UnitPrice_Sum",
|
||||||
|
"summarization": "Min",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "UnitPrice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "UnitPrice_Count",
|
||||||
|
"summarization": "Count",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "UnitPrice"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -55,12 +55,6 @@
|
|||||||
"summarization": "Sum",
|
"summarization": "Sum",
|
||||||
"detailTable": "FactInternetSales",
|
"detailTable": "FactInternetSales",
|
||||||
"detailTableColumn": "UnitPrice"
|
"detailTableColumn": "UnitPrice"
|
||||||
},
|
|
||||||
{
|
|
||||||
"aggTableColumn": "UnitPrice_Count",
|
|
||||||
"summarization": "Count",
|
|
||||||
"detailTable": "FactInternetSales",
|
|
||||||
"detailTableColumn": "UnitPrice"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"aggTableColumn": "FactInternetSales_Count",
|
"aggTableColumn": "FactInternetSales_Count",
|
31
SetUpAggs/AggsConfig_SetDQ.json
Normal file
31
SetUpAggs/AggsConfig_SetDQ.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"name": "AdventureWorksAggsProvider_PH",
|
||||||
|
"tables": [
|
||||||
|
{
|
||||||
|
"name": "DimGeography",
|
||||||
|
"mode": "DirectQuery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimCustomer",
|
||||||
|
"mode": "DirectQuery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimDate",
|
||||||
|
"mode": "DirectQuery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimProductSubcategory",
|
||||||
|
"mode": "DirectQuery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimProductCategory",
|
||||||
|
"mode": "DirectQuery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "FactInternetSalesAgg",
|
||||||
|
"mode": "DirectQuery"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
96
SetUpAggs/README.md
Normal file
96
SetUpAggs/README.md
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
# SetUpAggs
|
||||||
|
|
||||||
|
This utility is designed to assist in updating an Analysis Services and/or Power BI data model to utilize the Composite Model and Aggregations features. The utility will connect to a specified Azure Analysis Services and/or Power BI instance and read in a configuration file, this configuration file will specify the database and associated tables to update the Composite Model and Aggregations properties.
|
||||||
|
|
||||||
|
When running this utility against an Azure Analysis Services model, it will upgrade the model to Compatibility Level 1465, this change is not reversible via this utility. The utility will only update the metadata of tables listed in the configuration file, but it will both add and remove Aggregation column definitions, so that the model metadata will match the configuration file. Partition mode changes will be applied to all the partitions defined on the table.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
SetUpAggs.exe apply -Server asazure://server/instance -ConfigFile AggsConfig.json
|
||||||
|
|
||||||
|
## Steps
|
||||||
|
* Parse command line arguments, show basic help
|
||||||
|
* Connect to model
|
||||||
|
* Validate configuration file against the model, exit with relevant error message if issue is found in configuration or model
|
||||||
|
* Update model compatibility level if current compatibility level is below 1465
|
||||||
|
* Apply configuration changes to model
|
||||||
|
** For each table
|
||||||
|
*** For each partition, update partition mode to Dual, DirectQuery, Import, or Default as specified in config
|
||||||
|
*** For each column, remove any AlternateOf definitions that do not match an aggregation rule in the config
|
||||||
|
*** For each rule, add the AlternateOf definition to the model if it does not already exist
|
||||||
|
* If changes were made to the model, run the ExpandFull on the model
|
||||||
|
* If changes were made to the model, refresh the tables that were modified
|
||||||
|
|
||||||
|
## Configuration File Example
|
||||||
|
|
||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"name": "AdventureWorksAggsProvider",
|
||||||
|
"tables": [
|
||||||
|
{
|
||||||
|
"name": "DimGeography",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimCustomer",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimDate",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimProductSubcategory",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DimProductCategory",
|
||||||
|
"mode": "Dual"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "FactInternetSalesAgg",
|
||||||
|
"mode": "Import",
|
||||||
|
"aggregationRules": [
|
||||||
|
{
|
||||||
|
"aggTableColumn": "OrderDateKey",
|
||||||
|
"summarization": "GroupBy",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "OrderDateKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "CustomerKey",
|
||||||
|
"summarization": "GroupBy",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "CustomerKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "ProductSubcategoryKey",
|
||||||
|
"summarization": "GroupBy",
|
||||||
|
"detailTable": "DimProduct",
|
||||||
|
"detailTableColumn": "ProductSubcategoryKey"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "SalesAmount_Sum",
|
||||||
|
"summarization": "Sum",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "SalesAmount"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "UnitPrice_Sum",
|
||||||
|
"summarization": "Sum",
|
||||||
|
"detailTable": "FactInternetSales",
|
||||||
|
"detailTableColumn": "UnitPrice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"aggTableColumn": "FactInternetSales_Count",
|
||||||
|
"summarization": "CountTableRows",
|
||||||
|
"detailTable": "FactInternetSales"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -11,6 +11,21 @@
|
|||||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
@ -67,8 +82,25 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Include="AggsConfig.json" />
|
||||||
|
<None Include="AggsConfig_SetAggs1.json" />
|
||||||
|
<None Include="AggsConfig_SetAggs2.json" />
|
||||||
|
<None Include="AggsConfig_SetDQ.json" />
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
|
<None Include="README.md" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 and x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in New Issue
Block a user