 Hello, welcome to SSUnitech, so see on this side and this is continuation of SSIS tutorial. So today we are going to discuss about how we can load data into flat files from database as I am using SQL Server. So we have to load data from SQL Server to flat file. So here we can see again we are dealing with movement of data. So we have to use a data flow task inside the control flow and then when we move to data flow panel then we have to use already db source from which we want to get the data and then we have to load in a flat file destination. So we have a table which contains the employee information. We have four columns ID, name, date of birth and salary. So we want to load this data into a flat file and that flat file we contains comma separated values like ID then comma name then comma date of birth then comma salary. So we will get data in comma separated. So how we can achieve this? Let us move to SSDT. So here we have this SSDT. Now we need to create a new package. So now we need to rename it database to flat file and comma separated. As we discussed we need to use a data flow task. So drag and drop this data flow task. First double click on this. It will directly move to data flow panel. Inside the data flow panel we have to use OLEDB source because we want to get the data from SQL Server table. So this is our OLEDB source. We need to drag and drop. So here we need to make the connection with the SQL Server. So double click on this. It will ask for OLEDB connection manager. So we need to create a new one. We have already created a connection. So delete this and created new. Once click on new it will ask for server name. So we can select the server name. So this is our server name and then it will ask for database name by which we want to connect. So we want to connect with SSIS test. Then we can test our connection. Connection succeed. Then click on OK and again click on OK. So we have made the connection. Now we need to select the table from which we want to get the data. So we want to get the data from employee. So this is our employee data table. Now we can preview. So we are getting 4 columns as we have discussed ID, name, date of birth, salary close it and go to on columns. So do we want all the columns or we want to escape any column. If we want to escape any column then we can unselect that column name. As we don't want date of birth in our flat file. So we can skip over here. Now click on OK. So we have done our source path. We want to load the data in flat file. So drag and drop this flat file destination. Now we need to connect and now we need to make the connection with the flat file. So double click on this flat file destination. It will ask for flat file connection manager. So click on new. I need to create a new one because we don't have any connection right now. Now we can see it will ask for flat file formats. So we have different different flat file formats first is delimited then fixed width then fixed width with a row delimiter then right right. So we want to use first one click on OK. First we click on OK. So our flat file connection manager editor will be open. So now we need to select the file. So we don't have any file right now. So we need to create new. So we can do the name with database to flat file comma separated click on OK. So here we can see our format format should be delimited. Then we can see our header row delimiter CRLF. It will be discussed in next video and then our first row should be column names. So we can select this checkbox. Now move to columns. So in columns we can see column delimiter. So column delimiter should be comma. As we can see it has been selected by default. If we want to change then we can also have option to change it. Now go to advance. So here we can specify the size. If we want to increase the size then we can increase. For name we want length of this should be 500. Then we can select over here and we can change. Now click on OK. Now go to mapping. So inside mapping our mapping succeed. ID will be mapping with ID then name then cell. So now we can click on OK. And run this package. Once we run this package we can see 47 rows. So 47 rows has been loaded in our flat file. So go to on flat file. So we can see database to flat file comma separated. Now we can open it. So here we can see we have ID name and salary and it contains the comma separated values. So ID then comma then name then comma then salary and then move to next row. So we are getting the data. We can close it and stop the package. So as we have discussed we have four flat file formats. First is delimited then fixed width then fixed width with row delimited then right right. How we can load data from delimited we have discussed over here. In next video we will discuss how we can load data into fixed width and then how we can load data with fixed width with row delimited and then right right. And we will also understand what are the differences between these flat file formats. So thank you so much for watching this video. So if you like this video please subscribe our channel to get many more videos. Thank you so much for watching.