Analysis-Services/AsPartitionProcessing/AsPartitionProcessing.ConfigurationLogging/dbo/Tables/PartitioningConfiguration.sql

17 lines
1.2 KiB
MySQL
Raw Normal View History

2017-04-18 11:14:33 +08:00
CREATE TABLE [dbo].[PartitioningConfiguration] (
[PartitioningConfigurationID] INT NOT NULL,
[TableConfigurationID] INT NOT NULL,
[Granularity] TINYINT NOT NULL,
[NumberOfPartitionsFull] INT NOT NULL,
[NumberOfPartitionsForIncrementalProcess] INT NOT NULL,
[MaxDateIsNow] BIT NOT NULL,
[MaxDate] DATE NULL,
[IntegerDateKey] BIT NOT NULL,
[TemplateSourceQuery] VARCHAR (MAX) NOT NULL,
CONSTRAINT [PK_PartitioningConfiguration] PRIMARY KEY CLUSTERED ([PartitioningConfigurationID] ASC),
CONSTRAINT [CK_PartitioningConfiguration_Granularity] CHECK ([Granularity]=(2) OR [Granularity]=(1) OR [Granularity]=(0)),
CONSTRAINT [CK_PartitioningConfiguration_NumberOfPartitionsForIncrementalProcess] CHECK ([NumberOfPartitionsForIncrementalProcess]<=[NumberOfPartitionsFull]),
CONSTRAINT [FK_PartitioningConfiguration_TableConfiguration] FOREIGN KEY ([TableConfigurationID]) REFERENCES [dbo].[TableConfiguration] ([TableConfigurationID])
);