Database Reference
In-Depth Information
Cancel
on the
Processing
dialog, and edit the
<Type>
tag of the XMLA
command to
ProcessAdd
.
3. Switch to SSDT and open the sample database solution (not the live data-
base, but rather the project that defines it). Open the
Adventure Works
DW.dsv
data source view.
4. Remove all tables except
Customer
and
Geography
from the data source
view. Do not save changes. (In this case, we need the
Geography
table be-
cause some
Customer
attributes use columns in the
Geography
table. If
your dimension only references a single table, you could remove all objects
except the entity referenced by the
Dimension
attributes.)
5. Right-click on the
Customer
table and choose
Replace Table with New
Named Query
. Replace
FROM DimCustomer
with
FROM NewCustomers
within the
Edit Named Query
dialog. Leave all column selections and
everything else intact.
6. Right-click on the
Adventure Works DW.dsv
data source view and
choose
View Code
. Copy the full contents of the resulting XMLA, and paste
it into the SSMS window where you have the
ProcessAdd
command for the
Customer
dimension. Be sure the entire statement is within the
<Process>
tag.
7. Remove all content between the
<Annotations>
and
</Annotations>
tags. Also remove the
<CreatedTimestamp>
and
<LastSchemaUpdate>
sections from the XMLA processing command.
8. Save the XMLA command to a file, and execute the processing command in
SSMS. If you monitor the processing using
SQL Server Profiler
, you will see
a command similar to the following code, confirming that we are using the
NewCustomers
view and not the
DimCustomer
table to refresh the dimen-
sion:
SELECT
DISTINCT
[dbo_DimCustomer].[CustomerKey] AS
[dbo_DimCustomerCustomerKey0_0],[dbo_DimCustomer].[FullName]
AS [dbo_DimCustomerFullName0_1],
FROM
(
SELECT CustomerKey, GeographyKey,
Search WWH ::
Custom Search