 Hey guys, welcome to SSUnitex, so see this side and today we are going to see about the copy activity. So what is the copy activity and where we can use it. So go to the next slide and we will try to understand about the copy data activity. So what is copy activity? So the copy activity you can use to copy data among data store located in the on-premises and in the cloud. So we can move the data from one location to other location and location could be on-prem or the cloud. So after you can copy the data you can also use the other activities for the further transformation and analyze it. So this is the main use of the copy activity. It is very important and very often to use inside the Azure Data Factory. So before going to start with the copy activity with the practical demo, first I would suggest go and try to visit this link. I will provide this link in the description of this video so you can directly go and try to check this link. Let me quickly go through about this link. So basically in this link you can see the supported data store and formats. So what it means? So if we are going to use the copy activity, so inside the copy activity we are having the data store. So data is stored on which location that we can see right here. So for example in the first case the data is stored in the Azure Blob Storage. So the Azure Blob Storage can be used as a source, as a sync and supported by Azure IR. I did not discuss yet about the Azure IR and self-hosted IR that we will be going to see in the upcoming videos. As of now you can understand only Azure Blob Storage can be used for all those levels. Next we can scroll in the downside then here we can see the Azure database for the Maria Ruby. So on that case it cannot be used as a sync. We can only use as a source and IR level. Go to the downside, so here we have the databases. So inside the databases as we could see scroll down a little bit. So in the DB2 it is not supported for the sync as well and again we can see the hive so it is also not going to support as a sync. So in case of the mysic quality is also not supported as a sync location but for the Oracle and here we have the SQL Server somewhere. So on those cases all four options is available. So we can use as a source and as a sync. This list is going to modify day by day. So once you are going to implement the copy activity I would suggest to go and try to check about this. Now let us try to understand about the requirement. So go to on the SQL Server. So as per our requirement as we have already seen in the previous video. So we are having two tables. The first table is the source that is employed and second is the destination table with the same data structure. So we want to load the data from this source to the sync that is the destination one and this is our requirement. So go to on the browser and we will try to understand how we can design the pipeline here and first I want to create a new pipeline. So we can directly click on these three dots and click on the new pipeline and we can call this pipeline as the copy details because we are going to see in the detail about the copy activity. So for using the copy activity we have to either we can search in this or we can see inside the move and transform with the copy data. So we can drag and drop that. Now here we can see the name. So we can rename this like it is going to load the data from employee to employee destination. So we can rename as per our requirement. Next we can check the properties that we are having here. So we can also define the description what this copy activity will do. Next we can see the timeout. So the timeout which is we can see the seven days. So if your copy activity will be going to execute till seven days then this will be failed. So we can also reduce this timeout option from here. So by the 47 days we can also reduce that. Next we can see the retry. If your copy activity got failed on that case do you want to retry and how many number of times we want to retry. So that is zero by default and we can set like if you want to check if this copy data activity will fail two times we want to execute. So we can set this retry value as two. After that we can see the retry interval. So for example if failure is occurred and we want to start the execution again then whatever the difference between failure and next start that we can define here. Then we can see the secure output and secure input. So we can leave these two options. Next we can go inside the source. So now we have already created the dataset. So if you haven't watched the previous videos of this video series. So I would strongly recommend to go and watch the previous video. I will provide the link as well in the description. So where we have created the dataset. So I am going to use the same dataset. So this is for the input source. We can select it. Now here we can see the option for the use query or stop procedure. So from which we want to get the data. So as of now we are getting the data from table. So that is why the first option is selected. If we want to get the data from query then we have to select the second option and we need to define the query right here. In case of the stop procedure if we are getting the data from the stop procedure then we can select the third option. But here we are getting the data directly from table. So the first option is okay. Now here we can see the query timeout. So it is set is 120. So 120 minutes after it will be fed. So this is the timeout option. So we can leave that. Next is the isolation level. So we are not going to set any isolation level. And here we can see all the isolation levels. Those are available inside the SQL server. We can see it here like read, commit, read, uncommitted, repeatable, read, serializable and snaps on. So we are not going to set any isolation level. We can make it as none. After that we can see the partition option. So if we can click in this information then it will have the learn more option. So we can go and check the learn more. But the partition option we are not going to select this. So we can make it as none. If we want to do the physical partitioning of the table then we can select the second option. If we want to select the dynamic range then we can select and here we can see the column names. So by the dynamic range we can select all those columns and the upper bound and lower bound values for those. So I am not going to do anything on the partition. So we can make it as none. Now let me go inside the sync. So inside the sync again we had created one more dataset for the sync. So let me try to select that. So that is okay. So here we can see the second option that is the right behavior. So whether we want to up insert or the insert and third is the stope procedure. So by using any stope procedure we are going to insert the value. So we can do that from here. So that is not required. We can directly insert by using the table. So we can select the first option directly. After that the second option that we can see the bulk insert table log. So while we are going to do the bulk insert, so do you want to apply the log in the table or not? So that option we can set yes or no from here. So by default it is no. After that we can see the table option. So here none and second auto create the table. So if table is not there in your DP and we want to create that table as runtime. So we can select the second option. Otherwise we can choose the first option. So by default it is none. So your table should be available in the destination. Now here we can see the pre copy script. So this is very important. You need to more focus on this one. So if you want to execute anything, any query before inserting the data in your destination, then that query should be available here. So in our case we want to truncate the table. If any data is available in the table, so we want to truncate in the destination. So we have the employee destination table. So let me write the employee destination. So before going to inserting the data in this table, it will be going to truncate first and after that it will be inserting the data in the table. Next we can see the write batch timeout. So here we can set the value or we can leave this as it is. After that we can set the batch size or maximum concurrent connections. Everything we can set it here. So in the real time we are not going to more concern about all these. Now go to the mapping one and this is very important. The mapping one is very important. So let me try to import the schemas. So here if your source table and the destination table is not having the same columns, on that case we can do the mapping here inside the mapping. So here is the source we can see the employee ID and we have the employee name. So that is okay. If we can see in the destination side, so we have the employee ID and employee name. So everything is matching. So that's why we can see it here. And if you want to delete any column mapping, so we can see here plus symbol and this delete button. So we can click on the delete and that mapping will go on and data will be inserting only the mapping column that we have. So that we will see later in this video don't worry for that. So go to the setting tab. So here inside the setting tab it will be more focused about what about the consumption that we will be having and what will be the cost that we need to spend for loading the data. So that we can see it here. So we can leave that as well. Go to the user property. So inside the user property if we want to add any new user property, so that we can add. So I will make a separate video for the user property. In this video leave this as it is. Now let me try to save this. Now let me try to debug this. So we can click on this debug. So this pipeline will be executing. It will take a little bit time. So we can wait until this will not be executed successfully. So it is executed successfully with 8 seconds only. So now go to on the SQL server and in the destination let me try to refresh this table. So this table should have the four rows as we have already seen in the source that we can see. So this is the destination and this is the source. So both are same. So now what next we want to do? Let me try to click this and go to the mapping and this time I just want to delete one of the mapping with the employee name. Now let me save this and once I will be executing this package again. So first data will be truncating in our destination table and loading the data only for the employee ID column. So let me try to execute it. So it is executed successfully. Now let me go and try to check in the table. So let me try to refresh this. So your employee name column will have the null values. So as you can see employee name does not have any value and employee ID is only having the value. So this is just because of your mapping that we have deleted. Let me try to import it again. So by mistake if you have deleted then you can import it again and you will be going to have all those mappings there. So we have discussed about the copy data activity. In the next video we will be going to see about the user property and then after we will be also going to see about the monitor. So inside the monitor tab we can see all the packages which are executing that we can see the details here. So that we will be going to see in upcoming videos. 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.