python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
What is the difference between storing the changing value in fact vs dimension?
I have customer dimension table and the location of customer can change.
The customerid filters the sales fact table.
I have 2 options:
Slowly changing dimension type 2 to hold 1 new record for each ...
variable
Votes: 0
Answers: 3
What should happen to a SCD 2 table record if the record becomes inactive?
Let's say we have a table that has these values:
id| name| country| start_dt| end_dt| is_current| current_dt
1001| John| CA| 2001-01-10| 2012-06-01| TRUE| 2012-06-01
Next day, the same record comes f...
Parijat Bose
Votes: 0
Answers: 1
Using MERGE with analytic functions (like RANK) on target table
I have a data pipeline where, at random intervals, the a staging table called stg is truncated and overwritten with records. Then, using MERGE, the records in stg should be merged into the dimension t...
David
Votes: 0
Answers: 1
Create rows in sql join with overlapping date ranges
I have two tables as below:
TableA
ID
link1
link2
DATE_FROM
DATE_TO
99
H
J
1999-01-01
2005-01-01
TableB
ID
link1
link2
DATE_FROM
DATE_TO
99
X
Y
2002-01-01
2008-01-01
And I want...
ezryder
Votes: 0
Answers: 1