Escolar Documentos
Profissional Documentos
Cultura Documentos
Question #6
If you try to deploy the ETL process a second time, what error messages do you get? (It is
OK to do this, but verify that all 1188 rows are still there.)
[OLE DB Destination for DimProduct [127]] Error: SSIS Error Code DTS_E_OLEDBERROR. An
OLE DB error has occurred. Error code: 0x80040E2F.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult:
0x80040E2F Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult:
0x80040E2F Description: "Violation of PRIMARY KEY constraint 'PK_DimProduct'. Cannot
insert duplicate key in object 'dbo.DimProduct'.".
Expanding the tables folder in OLAP_Target in SSMS, we can right click on dbo.DimDate ->
go to Properties -> click on the Storage option on the left-hand menu of the popup -> we
see that there are still 1188 rows in the table.
Question #7:
List all the foreign keys for the fact table, and indicate the reference column
(candidate key) and dimension table that corresponds to each FK.
Foreign Key
Candidate Key
Dimension Table
ShipDateKey
DateKey
dbo.DimDate
OrderDateKey
DateKey
dbo.DimDate
DueDateKey
DateKey
dbo.DimDate
CustomerKey
CustomerKey
dbo.DimCustomer
ProductKey
ProductKey
dbo.DimProduct
Question #8
Define the terms measure and measure group according to the way that they are used in
SQL Server. Specifically indicate whether or not they apply to fact tables , dimensions,
cubes, and other objects.
A measure represents a column in the cube that contains quantifiable data, usually numeric
that can be aggregated. Every cube must have at least one measure but most cubes have
many measures. Structurally, a measure is often mapped to a source column in the fact
table, with the column providing the values used to load the measure. Measures are
context-sensitive, operating on numeric data in a context that is determined by whichever
dimension members happen to be included in the query.
Measures are grouped by their underlying fact tables into measure groups. Measure groups
are used to associate dimensions with measures. Measure groups are also used for
measures that have distinct counts as their aggregation behavior. Placing each distinct count
measure into its own measure group optimizes aggregation processing.
Question #9
What is meant by the phrase deploy and process a cube ? In particular, what major events
take place in Microsofts SSAS when doing so? One or two paragraphs are fine.
Deploying an Analysis Services project creates the defined objects in an instance of Analysis
Services. In other words, once the structure of the cube is created in BIDS, deploying the
cube creates the actual structure of it on an SQL analysis server. Processing the objects in an
instance of Analysis Services involves copying the data from the underlying data sources into
the cube objects. In other words, once the cube is deployed onto the SSAS server the data
needs to be loaded onto the structure and the aggregations need to be generated.
Question #10 to Answer and Hand In:
What is the purpose of creating a hierarchy such as Customer Geography? After all, we
already have all of its attributes in the list of attributes, and we should be able to access any
of these fields without problem.
Hierarchies, in tabular models, are metadata that define relationships between two or more
columns in a table. Hierarchies can appear separate from other columns in a reporting
client field list, making them easier for client users to navigate and include in a report.
Hierarchies aid to improve the overall user experience;
Hierarchies can provide a simple, intuitive view of an otherwise complex data
structure. For example, in our case , we have created a logical relationship from
Country-Region -> State-Province -> City.
Hierarchy levels can make it easier for users to find and include levels in a
report. Renaming a level does not rename the column it references; it simply makes
the level more identifiable.
Another example of a field that benefits from being flexible is Occupation. A customer is
likely to change their occupation over time so if we defined a linear relationship between
occupation and name, for example it would be more appropriate to keep these flexible.
ii. How does the specification of flexible vs. rigid help with data warehouse performance?
When a cube is deployed, flexible aggregations are destroyed and subsequently rebuilt
(while rigid aggregations are not). Not having to rebuild all aggregations equates to a
reduction in deployment time.
Question #15 to Answer and Hand In:
What is the difference between a member and an attribute in SSAS?
Attributes correspond to a collection of members in the dimension where the data is
queried from. Members represent the values that the attribute can take on, or the discrete
values that are contained in the dimension which the attributes are defined.
Question #16 to Answer and Hand In:
In plain English, explain the purpose of the DATENAME function.
The purpose of the DATENAME function is to convert a timestamp to a human readable
readable format.
Question #17 to Answer and Hand In:
Simplify the previous CalendarSemesterDesc script to be as short as possible (except for the
whitespace which is for the DBAs benefit).
'H' + CONVERT(CHAR(4), CalendarSemester) + ' ' + 'CY' + ' ' + CONVERT(CHAR(4),
CalendarYear)
Question#18 to Answer and Hand In:
Here were asking the basic question what education level and for which country are users
making the most purchases online. Given that individuals are increasingly turning to online
marketplaces this is a great avenue to determine which demographic to market to or where
marketing is perhaps not as effective. It appears that individuals with at least some form of
postsecondary education (such as a bachelors) tend to make the most purchases online.
Interestingly the highest number comes from Australia. We've drilled down our search to
education level and country. We also added a filter to determine whether these purchasers
are predominantly male, female, other, or perhaps none of them.