Wednesday 31 March 2021

Loading the fixed length file data in the table using derived column transformation in SSIS

 Using the drive column we can load the fixed-width flat file. Below is the fixed-width file.  

File mapping

Mapping of this file

Name: 0-19

Mobile: 19-34

Address: 34-60

 Let’s see how we load this file using Drive column.

Taking Data flow task.

  

And taking the source as flat file.

Creating the flat file connection.

  

Now taking the source as flat file.

Here we are getting header as one column.

  

Now taking the derived column transformation

Creating the three columns as below

 

Express of the column as below.

Dc_Name :

(DT_STR,100,1252)SUBSTRING([Name               Moble          Address                  ],1,19)

Dc_Mobile :

(DT_STR,15,1252)SUBSTRING([Name               Moble          Address                  ],20,15)

Dc_Emp_Address :

(DT_STR,100,1252)SUBSTRING([Name               Moble          Address                  ],35,25)

 

Now click ok.

Taking the destination as OLEDB and configuring this and mapping the columns.  

No Package is ready to run. 

Running this package now.

Before running the package data in the table. 

Now running this package.

  

Package executed successfully.

See the records in the table. 

Data loaded successfully.

No comments:

Post a Comment

If you have any doubt, please let me know.

Popular Posts