data-warehouse

How do I dimensionally model this relationship in a Kimball-style data warehouse?

倾然丶 夕夏残阳落幕 提交于 2020-01-07 00:58:11
问题 So I have two dimensions in my data warehouse: dim_machine ------------- machine_key machine_name machine_type dim_tool ------------ tool_key tool_name machine_type What I want to make sure of is the machine_type field in both dimensions has the same data. Should I create a third dimension to snowflake between the two or is there another alternative? 回答1: I'm not sure exactly what problem you're trying to solve? This sounds like something that you would simply build into the ETL process: for

What dw model is appropriate when there's no measure?

和自甴很熟 提交于 2020-01-06 18:38:47
问题 All the demos out there use a sales/order model as a measure in their examples. But my db is not transactional. It's a customer-centric model where there is one table for the customer which is joined to several attribute tables. Does this not even qualify for cube building because of the different model, or is there some way to still build cubes despite it not being transactional? I've heard of factless fact tables but don't really understand the concept yet. Is this where you would use one?

What dw model is appropriate when there's no measure?

假装没事ソ 提交于 2020-01-06 18:38:08
问题 All the demos out there use a sales/order model as a measure in their examples. But my db is not transactional. It's a customer-centric model where there is one table for the customer which is joined to several attribute tables. Does this not even qualify for cube building because of the different model, or is there some way to still build cubes despite it not being transactional? I've heard of factless fact tables but don't really understand the concept yet. Is this where you would use one?

Using ANYDATA/SQL_VARIANT in FACT table

假装没事ソ 提交于 2020-01-06 05:47:14
问题 I am designing the schema for fact table, but I am little bit unsure about using the ANYDATA/SQL_VARIANT to store measures. My reason for using this type is to reuse the column for measures of multiple reports based on same CUBE. What are the pitfalls/brawbacks of using ANYDATA/SQL_VARIANT in terms of performance, scalability, maintainability etc.? 回答1: You might want to look at this similar question. I would avoid these data types because: They may make your ETL process slower and more

Should DateKey YYYYMMDD be char(8)?

白昼怎懂夜的黑 提交于 2020-01-05 19:29:50
问题 The two most important fields, that are everywhere in our warehouse, are the UserAccountKey and the DateKey. DateKey is (int, not null) UserAccountKey is (int, not null) Are these the correct data type? The WH was created in 2006 so type Date wasn't an option, although we are now running 2008-R2 so it is now an option for the next iteration of the WH. It's a well established WH with multiple cubes built from it and a whole reporting system. Additional question to the above is when the WH was

Should DateKey YYYYMMDD be char(8)?

橙三吉。 提交于 2020-01-05 19:29:08
问题 The two most important fields, that are everywhere in our warehouse, are the UserAccountKey and the DateKey. DateKey is (int, not null) UserAccountKey is (int, not null) Are these the correct data type? The WH was created in 2006 so type Date wasn't an option, although we are now running 2008-R2 so it is now an option for the next iteration of the WH. It's a well established WH with multiple cubes built from it and a whole reporting system. Additional question to the above is when the WH was

“The restrictions imposed by the CONSTRAINED flag … were violated”

南笙酒味 提交于 2020-01-05 07:58:35
问题 I am new to ssrs .i am creating report which query on cube and provides the result i have used parameter for choosing to and from date and its giving error like "the restriction imposed by constrained flag is violated". what should i do ?i can not remove constrained because production server does not accepts mdx query without constrained. MDX Query is like this:- select {[Measures].[Customers],[Measures].[Contacted Customers], [Measures].[No of Bets], [Measures].[Stakes GBP], [Measures].

Time dimension fill problem

柔情痞子 提交于 2020-01-03 04:58:29
问题 My MySql table is returning days instead of time. I need a minimum level of minutes in a day so 1440 records should be auto populated but i keep getting days back. Any idea why? Also i dont need seconds, only hours and minutes but i am not sure how to do a date fill without seconds since the format of time is always '00:00:00' The procedure is below: DELIMITER // CREATE PROCEDURE p_sc_time(IN startdate DATETIME,IN stopdate DATETIME) BEGIN DECLARE currentdate DATE; SET currentdate = startdate;

Star schema [fact 1:n dimension]…how?

蹲街弑〆低调 提交于 2019-12-30 10:00:47
问题 I am a newcomer to data warehouses and have what I hope is an easy question about building a star schema: If I have a fact table where a fact record naturally has a one-to-many relationship with a single dimension, how can a star schema be modeled to support this? For example: Fact Table: Point of Sale entry (the measurement is DollarAmount) Dimension Table: Promotions (these are sales promotions in effect when a sale was made) The situation is that I want a single Point Of Sale entry to be

Database design: one huge table or separate tables?

我们两清 提交于 2019-12-29 04:30:11
问题 Currently I am designing a database for use in our company. We are using SQL Server 2008. The database will hold data gathered from several customers. The goal of the database is to acquire aggregate benchmark numbers over several customers. Recently, I have become worried with the fact that one table in particular will be getting very big. Each customer has approximately 20.000.000 rows of data, and there will soon be 30 customers in the database (if not more). A lot of queries will be done