Database Reference
In-Depth Information
column_2 FROM fact_table WHERE 1 = 2
), which can later be used as the
target for merging multiple existing partitions.
Creating partitions through the wizard
Now that you've seen the XMLA statement for creating a partition, let's see how it is
done using the
Partition
wizard within SSDT. Before we create additional partitions,
let's limit the original partition to the subset of fact data. Open the solution using
SSDT and click on the
Partitions
tab. Next, click on the ellipsis button in the partition
source box shown in the following screenshot:
Switch to the Query Binding option in the
Binding Type
drop-down box. In the par-
tition source dialog, you will see that SSDT scripts the SQL statement for you and
advises that you should limit the query to those rows that are not included in other
partitions of the same measure group. Replace the
WHERE
keyword with the
WHERE
DueDateKey< 20051231
clause in the query to limit the partition to Reseller Sales
records with a due date prior to December 31, 2005, and click on
OK
. You will see
the
Check
button to check the syntax of the query;the
Check
button does not check
the validity of the query—it is up to you to ensure that the query returns only the
necessary data. Once you save and deploy the changes, the partition will be bound
to the query instead of the table; you can then verify this by scripting the parti-
tion to a query window within SSMS. This time XMLA will contain
<QueryDefin-
ition></QueryDefinition>
tags instead of specifying the table identifier as
shown in the following screenshot:
Search WWH ::
Custom Search