 Hello, welcome to SSUnitech, social this site and this is continuation of SSIS tutorial. So today we gonna discuss about how we can load data into raw files from flat file and then we will also understand how we can load data into database from that file. At last we will understand what are the difference between flat file source and raw file source. So let's start. As we are dealing with movement of data, so we have to use data flow task inside the control flow panel and when we move to data flow panel then we can see we have to use a flat file source where we want to get the data and then we have to use a raw file destination where we want to load the data. So before going ssdT let's have a look of flat file. So this is our flat file as you can see it has comma separated values. First is id, then first name, middle name, last name and data output. So it contains total 5 columns. So we want to load this data into raw file. So let's move to ssdT. So this is our ssdT. Now we need to create a new package. So right click on this SSIS package and create a new package. And then I am going to rename this package from flat file to raw file. So first of all we have to use a data flow task inside the control flow panel. So drag and drop this data flow task and then double click on this data flow task. Then it will directly move to data flow panel. So inside data flow panel we have to use our source. So our source is flat file. So we need to drag and drop this flat file source. Now we need to make the connection with our flat file. So double click on this then it will ask for flat file connection manager. So click on new. Then we need to select our file. So file name we can browse. So we need to select the file. So this is our file and click on open. As we can see we have delimited values. So go to on columns and we have comma separated values. So we have five columns first is ID, first name, middle name, last name and data output. So we are getting the data. Now click on OK. So retain null values from the source as null values in the data flow task. So go to on columns as we want all the columns. So we have to select all these columns and click on OK. So we have done our source part. Now we need to configure our destination. So destination should be raw file destination. So this is our raw file destination. We need to drag and drop this raw file destination. So now we need to connect. Once we connect then we need to double click on this raw file destination. So once we double click then we can see we have access mode. It has two options. First is file name. Second is file name from variable. If we have file name in any variable then we can select our second part. If we want to select our file then we can select our first option. Now we can browse and we need to create a new raw file. So we can set with raw and click on open. Once we click on open then we can see our right option. Right option has four options. So first is create always create once append and truncate and append. So what it mean? So first is always create. It is used to drop and recreate raw file. Once execute our package. So it will always create a new file and drop our existing file. In our second option create once. It is used if you want to execute our package once. It will create raw files only once and if you want to execute package again then it will reflect an error. So if we have any scenario by which we need to create that raw file only once then we can select our second option. And our third option is append. It is used to append the data to our existing raw file. Truncate and append. It is used to truncate existing data and append the new data. So these four types of right option are available. So we need to select create always. So go to on column page. How many columns we want? We want all the columns. So we can select all the columns. Then go to on connection manager and generate initial file. So file has been generated successfully. Now click on OK. So once we move to our folder then we can see raw file has been generated. And we can also have a look inside the connection manager. We don't have any connection manager for this raw file destination. So there is no need to make any connection manager to connect with our raw file. So I am going to execute our package. So as we can see five rows. So five rows should be inserted in our raw file. So stop this package and go to on raw file. So this is our raw file. I am going to open this in notepad++. So as we can see we are getting the data. It's not very easy to understand. Now we need to create one more package by which we will load this data into our database. So this is our database and we have raw file table. In this raw file table we have ID, first name, middle name, last name and the top one. So all these columns are all labeled in our raw file. So now create a new package, right click go to on new package. I am going to rename this package with raw file to database. Now we are dealing with movement of data. So we have to use a data flow task inside the control flow panel. Then double click on this and inside the data flow panel we have to set our source and destination. So our source is a raw file source. So we can drag and drop this raw file source and double click on this. Then it will ask for the file name. We can browse and select our file. So this is our raw file. Click on open. So once we click on open then we can see columns. So we are getting all the columns which we have seen earlier. Now click on OK. So we have done our source path. Now we need to configure our destination. So destination is OLEDV destination. So we can drag and drop OLEDV destination. Now we can connect. Once we connect then we need to make the connection to connect with our database. So click on new. So I have already made the connection. I am going to use that one. Click on OK. So now we need to select our table. So our table is raw file table. We can select that table and go to on mapping. So mapping succeed click on OK. Now I am going to execute this package. So once I execute this package then 5 rows should be inserted in our SQL server table. So go to on SSMS. Now I am going to execute our selected statement. So here we can see data has been inserted successfully in our SQL server table. So I hope you have understand how we can load the data from flat file to raw file and then raw file to SQL server. Next what are the differences between flat file source and raw file source. So first is flat file source. A flat file is an ordinary file with text data like TXT or CSV files. In raw file a raw file is basically dump of our data in SSIS to file system. Next is we can read the data using notepad or any other editor tool in case of flat file. But in case of raw file data is in binary format so we cannot read it. In case of flat file connection managers are required to connect with flat file. But in case of raw file there is no need to make the connection. So in case of flat file it is very slow to transfer the data as compared to raw file. So in raw file it is used to transfer the data very quickly. So I hope you have understand how we can load the data from flat file to raw file and then raw file to our database. And you have also understand how we can differentiate between flat file source to raw file source. So thank you so much for watching this video. If you like this video please subscribe our channel to get many more videos. And please share with others. Thank you so much.