 Hey guys welcome to SSUnitech social decide and today we are going to start with the wait activity. So what is the wait activity and where we can use it in the real time. So when you use the wait activity in the pipeline, the pipeline waits for the specified period of time before continuing the execution of the subsequent activities. So it means if you are using the wait activity in your pipeline and where you are supplying some time. So your pipeline will be paused and after completion of that time again pipeline will be start executing. So in this example you can see we are having three activities. First is the complete date activity, second is the wait activity and third is again complete date activity. So first it is loading data into the sales table from the blog stories and after that it is waiting for 30 minutes. Because as per the scenario your sales data is coming before the customer data. So once sales data is receiving after 15 minutes or 20 minutes or 25 minutes the customer data will be receiving. So we have to load the sales data immediately in your table and the customer data we can load once that will be available. So here I have set the time for the 30 minutes. So this is one of the scenario and in this video we are going to see this in the practical. So first go to on the browser and we will try to implement this wait activity. So here as we can see we are under this stories account and here we can see the sales data container. So inside this container we are having two files. First is the customer file and second is the sales file. So sales file is getting before the customer file. So let me delete this customer file from here. It is having only sales data. So the requirement is very straight forward your sales data file is received and after some time maybe 5 minutes 20 minutes or 15 minutes. So within 30 minutes the customer file should be here. So we have to design our pipeline so sales files should be loaded immediately and after receiving the customer file the customer file data will be loaded in the table. So here we have two tables first is the customer and second is the sales table. So that you can see and as of now we do not have any data here. Now go to the Azure Data Factory and here let me try to create a new pipeline. So we can click on new pipeline and let me call this pipeline as wait activity. Here first we are required to use the copy data and this will be loading the data into the sales tables. So this should be the sales data. Now here we have to set up the source and sync. So we have already discussed about the copy data activity in the previous videos. So you can go and watch if you do not have any idea about the copy data activity. So here we have to set up the source. So let me quickly set up the source and this should be the Azure Blob Storage. So we can select it continue. This is the common elevated file so we can select it continue and here we can see we have set up a lot of link services. So I am going to create a new one and this is for the sales data. Here we have to select the subscription then the storage account so that is SSU testing. So now everything is okay we can click on create. Now here we have to select the file path. So we can browse it from here under the sales data we have the sales file. So we can set like this click on okay. So we have created this source which is the Relivated Test 3 that is now go to the sync part. And here let me click on new our destination is the Azure SQL. So let me select the Azure SQL database and here let me select this link service. And under this link service we have the table which is the sales table now click on okay. So everything is okay we can go in the mapping and import the schemas from there. So here we can see we did not set up the first row as header in the source. So we can go quickly and here we can set the first row as header. So we can open this data set and here you will see the option. So we can set it now go back to there and under the mapping let me import the schema again. So now we can see that this is a sales order ID customer ID sales order date everything is okay. Now we have done with the complete data for the sales. So now we have to use the weight activity. So this weight activity will be pausing your pipeline after loading the data into the sales table. Now here we can see this is very straightforward. So we can call this as wait for maybe two minutes go to the setting and here we can see this in seconds. So we can set this is 120 so that will be for two minutes. Now that is it for the weight activity again we have to use the complete data. So in the real time this time may be different so do not worry for that. Here this should be for the customer load. In the source let me click on new this should be the as your blob store is continue. Here we can select the link service. So as we have already created for the sales data so we can utilize the same under this sales data here we do not have the file. So let me try to upload the file once and after that we will remove the customer file from there. So let me quickly upload it. So that is there now go back to there and go to the root folder and try to refresh it. So now let me select this customer and click on OK and click on OK go to the sync part here let me try to search for the as your SQL database link service we can use the same as we have created in the earlier videos here we can see the customer. So now click on OK after that go to the mapping and try to import the schema. So here again we did the same mistake go to the source open it and try to make first draw as header so we can set it go to the mapping and import the schema again. So this should be having the proper names so that you can see everything is OK. Once we will be executing this pipeline your sales data will be executed first and after that it will be waiting for two minutes and after that loading the customer file. So first let me try to delete the customer file from here. So this should not have the customer file. So your sales file has been received and your pipeline will be start executing. So let me try to debug it. So first it will be loading data into the sales table so that we can see it is executing. So now here we can see it got succeed as of now your broad storage did not have the customer file there now we can check sales file will have the data that looks OK. Let me upload the file for the customer one. So in this weight this customer file will be there. So as we have uploaded this file so it is waiting. So once this weight will be completed your file that is the customer file is there. So your second company data activity will be completed with success. So now you can see weight is completed now it is executing the customer load. So we can refresh it and it should be completed with success as you can see. So now we can go in the SSMS and we will try to check the data. So data is there. So this is the main purpose of using the weight activity because when it was executed this pipeline the customer file was not there in the source but after completion of the weight activity the file was there so that is why the copy data got succeed otherwise if we did not use the weight activity in this pipeline your pipeline will be failed because customer file was not there. So I hope guys you have the better understanding about the weight activity. If you have still any doubt then you can comment your questions in the comment box. 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.