Initial Load will be used at the very first stage of loading data in to the data warehouse software. Below is the detailed procedure to develop the Initial Load Task
To create table for Initial Load. Script with drop and create.
USE [Work] --DB Name
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[InitialLoad]') AND type in (N'U'))
DROP TABLE [dbo].[InitialLoad]
USE [Work] --DB Name
GO
CREATE TABLE [dbo].[InitialLoad](
[IsInitialLoad] [bit] NULL,
[ConstituentConfig] [bigint] NULL
) ON [PRIMARY]
Once table created in SQL Server Database, get into the SSIS package wizard.
Create Variable as 'IsInitialLoad'
Create 'Execute SQL TasK' named as 'SQL Get IsInitialLoad'
To create table for Initial Load. Script with drop and create.
USE [Work] --DB Name
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[InitialLoad]') AND type in (N'U'))
DROP TABLE [dbo].[InitialLoad]
USE [Work] --DB Name
GO
CREATE TABLE [dbo].[InitialLoad](
[IsInitialLoad] [bit] NULL,
[ConstituentConfig] [bigint] NULL
) ON [PRIMARY]
Once table created in SQL Server Database, get into the SSIS package wizard.
Create Variable as 'IsInitialLoad'
Create 'Execute SQL TasK' named as 'SQL Get IsInitialLoad'
Get into the task and set Parameter Mapping as seen below
Go to SQLStatement option and write the below query
SELECT ? = isnull(IsInitialLoad, 1) from dbo.InitialLoad
Get two connecter from the InitialLoad task as seen below
In the left side connecter - Double click - select options as below and test it using TEST tab.
This connecter1 will connect the tasks which is set to load data initially in the database.
In the right side connecter - Double Click - select options as below and test in using TEST tab.
This connecter2 will connect the tasks which is set to load data incrementally in the database.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.