Question
DECLARE @return INT --#1. DROP ALL THE FOREIGN KEYS PRIOR TO TRUNCATING TABLES IN THE STAR SCHEMA EXEC [BIClassProject2].[DropForeignKeysFromStarSchemaData]; --#2. Check row count before truncation
DECLARE @return INT
--#1. DROP ALL THE FOREIGN KEYS PRIOR TO TRUNCATING TABLES IN THE STAR SCHEMA
EXEC [BIClassProject2].[DropForeignKeysFromStarSchemaData];
--#2. Check row count before truncation
EXEC [BIClassProject2].[ShowTableStatusRowCount]
@TableStatus = N'''Pre-Truncate of table '''
--#3. Always Truncate the Star Schema Database
EXEC [BIClassProject2].[TruncateStarSchemaData];
--#4 Load the star Schema
EXEC [CH01-01-Dimension].[DimProductSubcategory];
EXEC [CH01-01-Dimension].[DimProductSubcategory];
EXEC [CH01-01-Dimension].[DimProduct];
EXEC [CH01-01-Dimension].[SalesManagers];
EXEC [CH01-01-Dimension].[DimGender];
EXEC [CH01-01-Dimension].[DimMaritalStatus];
EXEC [CH01-01-Dimension].[DimOccupation];
EXEC [CH01-01-Dimension].[DimOrderDate];
EXEC [CH01-01-Dimension].[DimTerritory];
EXEC [CH01-01-Dimension].[DimCustomer];
EXEC [CH01-01-Fact].[Data];
--#5 Recreate all of the foreign keys prior after loading the star schema
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started