microsoft / microsoft/sql-server-samples
OrderDate, DueDate and ShipDate for [AdventureWorksDW2019].[dbo].[FactResellerSales] does not match OLTP tables
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
SELECT OrderDateKey, DueDateKey, ShipDateKey
FROM [AdventureWorksDW2019].[dbo].[FactResellerSales]
where SalesOrderNumber = 'SO53557'
gives this result:
OrderDateKey DueDateKey ShipDateKey
20130228 20130312 20130307
but
SELECT [OrderDate],[DueDate],[ShipDate]
FROM [AdventureWorks2019].[Sales].[SalesOrderHeader]
where SalesOrderID = 53557
gives:
OrderDate DueDate ShipDate
2013-07-31 00:00:00.000 2013-08-12 00:00:00.000 2013-08-07 00:00:00.000
I checked [AdventureWorks2019].[Sales].[SalesOrderDetail] and the details are correct including Purchase Order number, so this should be the OLTP record for DW Fact table, but the dates do not match.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by rerunning the two queries against FactResellerSales and Sales.SalesOrderHeader for SO53557 and SalesOrderID 53557. Trace how the AdventureWorksDW2019 fact row is populated from the AdventureWorks2019 OLTP tables, using SalesOrderDetail to confirm the record mapping. Done means the date keys match the source dates or the issue documents the expected mapping and correction path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- data-engineering, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100