Questions tagged [dimension]

37 questions
8
votes
2 answers

Best approach for populating date dimension table

I am looking to populate a date dimension table in a SQL Server 2008 database. The fields in the table are as follows: [DateId] INT IDENTITY(1,1) PRIMARY KEY [DateTime] DATETIME [Date] …
8
votes
1 answer

Dimension and Fact for same entities?

I'm rather new at DW design and am working on a DW to model some IT infrastructure. The major problem/question at this point is how to model drive information. We will be collecting aggregate data on files and folders, and separate data on physical…
JNK
  • 18,064
  • 6
  • 63
  • 98
8
votes
1 answer

Time dimension or timestamp in fact table?

Which would you use, and why? A separate time dimension or putting a timestamp in a fact table? Or perhaps both? I am building a data warehouse, and need to represent the time of day that events occur at, down to the one second granularity. I want…
user2800708
  • 243
  • 2
  • 5
7
votes
2 answers

How to store high-dimensional (N > 100) vectors and index for fast lookup by cosine similarity?

I am trying to store vectors for word/doc embeddings in a PostgreSQL table, and want to be able to quickly pull the N rows with highest cosine similarity to a given query vector. The vectors I'm working with are numpy.arrays of floats with length…
J. Taylor
  • 379
  • 2
  • 5
  • 17
7
votes
1 answer

Dynamic Dimension Security

I have a cube in SSAS 2012 with about 30 dimensions, one of which is Company. The Company dimension contains a list of companies, of which there are several hundred in the cube. Our security model requires that users have visibility only to those…
JNK
  • 18,064
  • 6
  • 63
  • 98
5
votes
2 answers

In star schemas, what should I do when a dimension has a date attribute?

I'm trying to learn about dimensional models and star schemas. Say I have a Sales fact table recording the total sales at retail stores, with, say, four dimensions, Date, Customers, Stores, and Promotions (as in sales promotions like coupons). …
user1481
  • 151
  • 1
  • 1
  • 2
5
votes
4 answers

Consolidating a row of data, based on previous rows

I'm trying to build a history table out of an audit log (ultimately to build out a type 2 dimension table). Unfortunately, the audit log only records the specific fields being changes. Here's a rough example of what I'm talking about; CREATE TABLE…
4
votes
2 answers

Open source and commercial tools to build dynamic queries of fact tables in star schema

What user interfaces or tools (commercial and/or open source) can query a star schema model (Ralph Kimball dimensional model)? So for example, if we have X fact tables, and Y dimension tables, and Z cross reference tables, we'd like to query a…
JustBeingHelpful
  • 2,116
  • 18
  • 45
  • 61
3
votes
2 answers

Datawarehouse - Dimension, Fact, or Degenerative dimension

I am building a warehouse for a billing system that bills a number of services/utilities on the same invoice, as such I am having real trouble conforming to a recognised design method for the warehouse. I think I still very much have an OLTP hat…
GarethD
  • 693
  • 7
  • 14
3
votes
1 answer

Does surrogate key assignment for a fact table require that the source data has natural keys?

Let's say I have a simple OLTP database with orders, products, and customers: And from it, I am building a data mart with an orders fact table, product dimension, customer dimension, and date dimension: When loading the orders table into…
8kb
  • 2,639
  • 2
  • 32
  • 36
3
votes
2 answers

How to calculate a percentage over a dimension attribute and get correct aggregates?

We have a fact table with the weight trasported by truck/driver/day. And a dimension with the max weight per truck. We would like to have the % of weight transported, so we started with create MEMBER CURRENTCUBE.[Measures].[% WT] AS…
DeepButi
  • 161
  • 5
3
votes
1 answer

MDX - Getting the last 6 month Dynamically

I have a Dim table that called DimAccounts. It is describing a User account and the dates that the account has been created. for Example: I would like to get the list of accounts that have been created on the last 6 month Dynamically. For…
Shmuel Milavski
  • 111
  • 2
  • 9
2
votes
1 answer

How to optimize performance for dimension attributes?

I'm looking to enhance the cube processing time and someone suggested me to set "AttributeHierarchyEnabled='False'" for attributes which were not used at user defined hierarchies but I'm not clear with the "AttributeHierarchyEnabled" property and…
RajeshKannan
  • 163
  • 2
  • 9
2
votes
3 answers

Data Warehouse measures without a corresponding dimension

I have an operations database that contains this table: salesQuality salesPrice salesCategory According to my business requirements, the salesQality and salesPrice are measures. However, salesCategory is a dimension. Unfortunately, in the…
2
votes
1 answer

How to remove leaf member values?

I have a dimension hierarchy that is related to multiple fact tables with different granularities. In the case of one fact table, it relates to the middle level of a three level hierarchy. When you drill down that dimension, I would prefer to have…
Jeff Sacksteder
  • 1,317
  • 2
  • 19
  • 30
1
2 3