Questions tagged [fact]

A fact or fact table is the central table in a Star or Snowflake schema of a data warehouse. A fact table stores quantitative information for analysis and is often denormalized. It measures the business operations in the organization. It is included in every data warehouse or data mart.

A fact or fact table is the central table in a Star or Snowflake schema of a data warehouse. A fact table stores quantitative information for analysis and is often denormalized. It measures the business operations in the organization. It is included in every data warehouse or data mart.

Facts are the measurements that result from a business process event and are almost always numeric. A single fact table rows has a one-to-one relationship to a measurement event as described by the fact table's grain. Fact table corresponds to a physical observable event.

Within a fact table, only fact consistent with the decraled grain are allowed. The fact table work with dimension tables. The fact table holds the ways in which the fact table data can be analyzed. There are two type of columns in there - foreign key columns for join with the dimensions and the measures columns, containing the data analyzed.

Example

In retail sales transaction, the quantity of a product sold and its extended price are good facts. Store manager's salary is disallowed in the fact table.

Links

182 questions
2
votes
1 answer

Merge, delete when not on Source

I have an issue with a merge statement into a FACT TABLE It was pretty simple until the users started to delete records from the source. Current SQL: Set Count = 1 WHEN NOT MATCHED INSERT WHEN MATCHED UPDATED New SQL: So in this example, a…
StackUser1000
  • 23
  • 1
  • 3
2
votes
1 answer

xUnit TestServer MVC CORE

I am trying to setup a test for getting all my product but I am getting and ArgumentNullException but I do not get why, I recently started studying this so ... This is the error message Message: System.ArgumentNullException : Value cannot be…
2
votes
1 answer

JBoss Drools insert facts from DRL

I need my WorkingMemory to be aware of facts which are created in the DRL as follows: rule "Your First Rule" when $testRule : TestRule(count >= 100) then System.out.println("100 PACKETS"); end Is there a way of getting the WorkingMemory to…
cwrwatson
  • 61
  • 1
  • 6
2
votes
2 answers

EDW Fact Table for Parent Child

I am building an EDW based on Kimballs approach. I have a parent/child relationship in our source system (Order/Line Items). The fact table I have is defined at the line item grain. Business would like to be able to slice and dice this data by…
user3776554
  • 119
  • 4
2
votes
1 answer

What is the best way to model baselines, projections, or goals in dimensional modeling?

I'm designing on my first real Kimball-style star schema dimensional model. I've slogged through a lot of his books, and I'm part-way through Star Schema - The Complete Reference by Adamson (which I find much more practical and straightforward than…
2
votes
0 answers

Dimensional model for hierarchy goal

I am developing a sales dimensional model that must have these facts: Gross Sales, Gross Revenue and Quantity of Sold Coupons per Sales Executive, City, Coordinator and Manager. Problem is that for each level of this hierarchy (Sales Executive,…
Lucas Rezende
  • 564
  • 1
  • 7
  • 18
2
votes
1 answer

Prolog- Returning elements from facts

i encounter a problem with facts. Let's say i got 3 facts and check(X) question. fact(a,b). fact(b,c). fact(a,d). check(X):- //some calculation with fact() How to make above question to return list of elements for given X from all facts? For…
Dago
  • 788
  • 2
  • 9
  • 24
2
votes
1 answer

fluentassertion won't compile

I am obviously missing some assembly or reference to make this work, it may be fluent assertions or it may be Microsoft.Team Foundation.Warehouse. Neither of which I am sure how to use / add as references (well I am sure how to install fluent…
Mr Heelis
  • 2,370
  • 4
  • 24
  • 34
2
votes
1 answer

Answer Set Programming - How to count number of facts appears to be my query result?

So I have a set of facts and a query written in ASP to be run on DLV, %Q1 : Find the implicit "is_a" relationship between terms %ex: if term A is is_a term B, term B is_a term C, then term A is_a term C %is_a One level triple1(TermA,…
2
votes
0 answers

drools programmatically generate a fact model

I need to generate an enormous fact model using an ontology external to drools. Now, I could certainly write a script/program to pull this off. My approach would be to generate a java bean for each ontology class which contains the appropriate…
melchoir55
  • 6,842
  • 7
  • 60
  • 106
2
votes
1 answer

SSAS - Dimension and Fact tables historical data - Mapping fact table with dimension table

i have designed places related warehouse tables - DimPlaces, FactPlaces, DimGeography. It is straightforward design if you see. All the locations is in DimPlaces (Addrline1, Addrline2,placename,etc) and geography hierarchy is in DimGeography (City,…
2
votes
2 answers

How to create a fact table using natural keys

We've got a data warehouse design with four dimension tables and one fact table: dimUser id, email, firstName, lastName dimAddress id, city dimLanguage id, language dimDate id, startDate, endDate factStatistic id, dimUserId, dimAddressId,…
s.froehlich
  • 863
  • 1
  • 11
  • 19
2
votes
1 answer

SSAS CUBE 2 fact tables and 1 dimension

I have 2 fact tables and 1 dimension. Fact1 foriegn key is directly pointing to DIM primary key. Fact1 and Fact2 have common column say e.g., "orgkey" Fact2 is not connected to DIM as it hasn't got any common column. But I want to connect Fact2 to…
john ging
  • 45
  • 1
  • 7
1
vote
1 answer

How to assert new rule from user input (PROLOG)

I want to accept users' input, i.e. [garfield, hates, blacky]. hates/2 doesn't exist currently. In my database, process:- read(Input_List), add_rule(Input_List). add_rule([X, Predicate, Y]):- assertz(Predicate(X, Y)). But this doesn't…
Js Lim
  • 3,625
  • 6
  • 42
  • 80
1
vote
1 answer

Prolog: retract fact by it's name

I want to retract fact, but I have not direct access to the name of fact. To get anything from this fact I'd use following code: facts.pl file: :- dynamic fact/2. fact(a, b). fact(b, e). fact(a, c). fact(e, d). fact(c, d). fact(d, f). fact(d,…
Temax
  • 87
  • 7
1
2
3
12 13