 Hey guys, welcome to SSUNITEX, so till this side and today we are going to discuss about the delete activity So what is the delete activity and where we can use that? So here we can use the delete activity in Azure Data Factory to delete the files or folder From the on-prem storage or the cloud storage So if your data is available on your on-prem environment or on your cloud environment that is in Azure Blob Then we want to delete those files. So for that we can use the delete activity Next this activity is used to clean up or archive the file when they are no longer needed For example, if we have any file and we have Loaded the data from that file and that file is not needed anymore So we can archive that file or we can delete the file. So for that we have to use the delete activity Here we can see the data stores. So these are the supported format So first we can see the Azure Blob stories. Next, we can see the Azure Data Lake 1 and 2 Then here we can see the file system So this file system will be going to use for your on-prem and this Azure Blob is for deleting data from the Azure Blob. So go to on the browser and we'll try to see in the practical So first we want to delete the data from the Blob stories So here this is the Blob stories as we can see and under this container SSU testing we are having these three files. So we want to delete these three files from here So how we can do that? So for that we have to use the delete activity so let me try to add a new pipeline and Let me call this pipeline as delete activity. So this is delete activity and after that we can Go inside these activities and let me search for delete. So we can drag and drop this delete here First we are having this General option then we can see the source then logging setting and then user properties So in the general setting here, we can rename this task. So let me call this as delete files under Blob Storage now here we can see the timeout options. So that is Seven days next we can see the retry if this delete activity got failed Then how many type of we want to retry and what were the interval between retry? So these are options here go to on the source and under the source first We can see the data set. So we have to set this data set So let me click on new because we have not created any data set yet Now here we can see these are the sources by which we can delete So as we can see here file system FTP and other options So we can select for this as your blob storage because we want to delete it from here Let me click on continue Now here we can call this as delete underscore files From your blog stories. So this is your data set name here. We need to create the link service so let me go here and click on you and Let me call this link service as delete files under the blog stories Now here we can see the IR that is auto resolve integration runtime. That is okay Here we need to select the storage account. So as we have already seen the storage account is SSU Testing so we can select it from this drop down. So it will be going to connect under this Storage account now we can click on this create So it will be going to create a new link service and that link service will be pointing SSU testing blog stories now here we need to Set the path Directory and the file that we want to delete. So we want to delete under this input So this input container, whatever the files we are having we want to delete it So we can click on this browse and after that we can see this input. So let me go there if we can Select any one file then that will be deleting If we are deleting all the files, then we need to go under this input only and Click on okay So here we can see directory and file is empty Whatever the data and files are available under the input that will be deleting. So let me click on okay so here we have set up each and everything under the source and Let me go under the login setting. So what is the login setting? So this is very important So while we are going to delete the files from the blog stories, we want to keep the track So how we can do the tracking there by creating another file under the One more container that we have that is the login So here a new file should be generated and that will be keeping the information of the files that will be deleting So how we can create that so go to on the So here we can see the account link service. So we need to create a link service. So that link service will be Pointing that location that is the login location. So click on new and here this link service We are creating for login delete activity Here everything looks good. We can only select the storage account that is ssu testing It is loading the key And then we can create that So here we are using the same link service. So we have already created if you want then you can utilize the same Now here it is asking the folder path. So we can browse and here we have four folders So it is loading So that you can see input logging output and ssu. So we want to keep the Logging file under this logging folder. So we can click on okay So here we have done each and everything Now we can publish this And after publishing we will be going to execute this. So publish is completed as you can see now Let me try to debug it. So it will be going to execute this pipeline and Here we can go under this input And this will not have any file as of now we can see three files. So it is executing as we can see So once this will be completed So input folder will not have any files So it is executing So here we can see it goes succeed. So go to the input folder and let me refresh this So this should not have any files. So as we can see no blobs found. So it means everything is deleted Now go to the logging folder and under the logging folder. Here we have this folder And this is the file. Let me try to open this And here we can see the option for download if you want to download it But I don't want to download. I just want to See whatever the data that is there. So for that we can go in the edit And here we can see name category status and error if we'll be going to have any error for deleting the file So that error should be Here So as we can see the first file was captured second is the customer third is the sales So these three files has been deleted And the type that we can see the file And the status that is deleted from here. So From using that logging we can track like which file we have deleted from the blog storage So this is we have done go to on the PowerPoint and here Next is the best practices. So what is the best practice that we need to follow for deleting the file? So first we can see the backup your files before deleting them With the delete activity in case you need to restore them in the future So here it is deleting permanently. We cannot restore that in future So if you want to restore that in future, so we should Keep the backup of the files Next is the makes sure that the service has Right permission to the delete folder So if you do not have the right permission in the delete folder or the file Then you will not able to delete The files and folder under the Blog storage, so we should have the right permission there Next make sure you are not deleting the file that are being written at the same time So like it One place we are writing that and another place we are going to delete that so make sure you are not deleting those files And last one here we can see if you want to delete the files or folders from on-prem System so in this video we did not seen how we can delete the files under the on-prem system In the next video, we will also see how we can delete the files in on-prem system as well So while we are going to delete the file from on-prem system So make sure you are using the self hosted integration runtime with a Version greater than 3.14 so that is the prerequisite for deleting the file under the On-prem system so that we will see in the next video So thank you so much for watching this video if you really like this video Please subscribe our channel to get many more videos Don't forget to press the bell icon to get the notification of our newly uploaded videos. See you in the next video