This commit is contained in:
Christian Wade 2017-04-17 21:15:07 -07:00
parent c72eecee1e
commit e4706cbd20
5 changed files with 32 additions and 12 deletions

View File

@ -22,7 +22,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Development' ">
<OutputPath>bin\</OutputPath>
<DeploymentServerName>localhost:63192</DeploymentServerName>
<DeploymentServerName>localhost</DeploymentServerName>
<DeploymentServerEdition>Developer</DeploymentServerEdition>
<DeploymentServerVersion>Version_11_0</DeploymentServerVersion>
<DeploymentServerDatabase>AdventureWorks</DeploymentServerDatabase>

View File

@ -62,6 +62,7 @@
<Folder Include="dbo\" />
<Folder Include="dbo\Tables\" />
<Folder Include="dbo\Views\" />
<Folder Include="dbo\Stored Procedures\" />
</ItemGroup>
<ItemGroup>
<Build Include="dbo\Tables\ModelConfiguration.sql" />
@ -69,6 +70,7 @@
<Build Include="dbo\Tables\ProcessingLog.sql" />
<Build Include="dbo\Tables\TableConfiguration.sql" />
<Build Include="dbo\Views\vPartitioningConfiguration.sql" />
<Build Include="dbo\Stored Procedures\usp_LastProcessingLogs.sql" />
</ItemGroup>
<ItemGroup>
<PostDeploy Include="Script.PostDeployment1.sql" />

View File

@ -34,7 +34,14 @@ VALUES(
,0 --[MaxDateIsNow]
,'2012-12-01' --[MaxDate]
,1 --[IntegerDateKey]
,'SELECT * FROM [dbo].[FactInternetSales] WHERE OrderDateKey >= {0} AND OrderDateKey < {1} ORDER BY OrderDateKey' --[TemplateSourceQuery]
,
'let
Source = #"AdventureWorks",
dbo_FactInternetSales = Source{[Schema="dbo",Item="FactInternetSales"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_FactInternetSales, each [OrderDateKey] >= {0} and [OrderDateKey] < {1}),
#"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"OrderDateKey", Order.Ascending}})
in
#"Sorted Rows"' --[TemplateSourceQuery]
),
(
2 --[PartitioningConfigurationID]
@ -44,6 +51,13 @@ VALUES(
,1 --[NumberOfPartitionsForIncrementalProcess]
,0 --[MaxDateIsNow]
,'2012-12-01' --[MaxDate]
,1 --[IntegerDateKey]
,'SELECT * FROM [dbo].[FactResellerSales] WHERE OrderDateKey >= {0} AND OrderDateKey < {1} ORDER BY OrderDateKey' --[TemplateSourceQuery]
,0 --[IntegerDateKey]
,
'let
Source = #"AdventureWorks",
dbo_FactResellerSales = Source{[Schema="dbo",Item="FactResellerSales"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_FactResellerSales, each [OrderDate] >= {0} and [OrderDate] < {1}),
#"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"OrderDate", Order.Ascending}})
in
#"Sorted Rows"' --[TemplateSourceQuery]
);

View File

@ -0,0 +1,8 @@
CREATE PROC [dbo].[usp_LastProcessingLogs] AS
SELECT [Message]
FROM [dbo].[ProcessingLog]
WHERE ExecutionID =
( SELECT MAX([ExecutionID]) FROM [dbo].[ProcessingLog]
WHERE [LogDateTime] = (SELECT MAX([LogDateTime]) FROM [dbo].[ProcessingLog])
)
ORDER BY [LogDateTime]

View File

@ -159,10 +159,8 @@ namespace AsPartitionProcessing.SampleClient
"let\n" +
" Source = #\"AdventureWorks\",\n" +
" dbo_FactInternetSales = Source{[Schema=\"dbo\",Item=\"FactInternetSales\"]}[Data],\n" +
" #\"Filtered Rows\" = Table.SelectRows(" +
"dbo_FactInternetSales, each [OrderDateKey] >= {0} and [OrderDateKey] < {1}),\n" +
" #\"Sorted Rows\" = Table.Sort(" +
"#\"Filtered Rows\",{{\"OrderDateKey\", Order.Ascending}})\n" +
" #\"Filtered Rows\" = Table.SelectRows(dbo_FactInternetSales, each [OrderDateKey] >= {0} and [OrderDateKey] < {1}),\n" +
" #\"Sorted Rows\" = Table.Sort(#\"Filtered Rows\",{{\"OrderDateKey\", Order.Ascending}})\n" +
"in\n" +
" #\"Sorted Rows\"\n"
)
@ -186,10 +184,8 @@ namespace AsPartitionProcessing.SampleClient
"let\n" +
" Source = #\"AdventureWorks\",\n" +
" dbo_FactResellerSales = Source{[Schema=\"dbo\",Item=\"FactResellerSales\"]}[Data],\n" +
" #\"Filtered Rows\" = Table.SelectRows(" +
"dbo_FactResellerSales, each [OrderDate] >= {0} and [OrderDate] < {1}),\n" +
" #\"Sorted Rows\" = Table.Sort(" +
"#\"Filtered Rows\",{{\"OrderDate\", Order.Ascending}})\n" +
" #\"Filtered Rows\" = Table.SelectRows(dbo_FactResellerSales, each [OrderDate] >= {0} and [OrderDate] < {1}),\n" +
" #\"Sorted Rows\" = Table.Sort(#\"Filtered Rows\",{{\"OrderDate\", Order.Ascending}})\n" +
"in\n" +
" #\"Sorted Rows\"\n"
)