 Hey guys welcome to sysunitech society site and today we are going to see about the system variables so what are the system variables and what is the scope of the system variable and how we can use that in the real-time environment so that we will be going to see in this video. So before going forward if you haven't watched the last video of this video series so I strongly recommend to watch that video because in the practical implementation I am going to use the same pipeline that we had created in the last video so go to the next slide and we will try to understand about the system variable so system variables are available at five level so those levels you can see the pipeline scope level then we can see the schedule trigger level tumbling window trigger then the storage event trigger scope then the custom event trigger scope so these are the five levels by which we can access the system variables and we can use these variables in expressions when defining the entities within the idle service so we will be going to see in the practical so go to on the browser and so here before going to implement I would strongly recommend to widget this site so under the msdn system variables are five levels that I told you so here we can see the pipeline scope so under the pipeline level we will be going to see these are the system variables like the pipeline data factory then the pipeline then the run id trigger time trigger id so all these are the system variables available and you can also read the description from here so like for the pipeline so it is the name of the pipeline then the data factory so it will be having the data factory name then the type of the trigger so that will be the manual trigger or serial trigger or which type of trigger similarly we have the trigger id so each information is available here so from where we are getting these informations so go to the data factory go to the monitor tab and under the monitor tab here we can see these options like the pipeline name run id run end so everything is available here like duration trigger type error status run run id so all the informations are available here so these informations we can get by using these system variables so that's we can see here similarly if we can go in the schedule trigger scope level so where we have only these two type of variable so the first variable schedule time then the start time so these two type of variable is available under the schedule trigger scope similarly for the tumbling window trigger here we are having these four type of variable like window start time window end time schedule time start time so these are four variables available under the tumbling window trigger similarly if we go under the storage event trigger so here it is having only these three like the file name folder path start time if we can scroll down under the custom event trigger scope so here we have these four like the event time then the subject then the key name and the start time so these are the system variables available by which we can use all those as per our requirement so in our requirement go to the author tab and under the author tab we have created this pipeline in the last video so under this dynamic load so while we are going to execute this pipeline we want to keep the logging information in some of the table so in the SQL site we are having one of the table that is the login detail under the ssu database and here we have created this sp so under this sp it is taking like the pipeline name run id trigger type run start date run end date and here we can see the server name and dv name so these two are not the system variables so these two variables we have created in the last video in the parameters so we just want to inserting the data under this table by using these input parameters so this sp will be going to use inside the pipeline in the logging it will be going to keep the information so go to on the browser and here i am going to use the stroke procedure task so we have not discussed about the stroke procedure till now so don't worry for that this is very straightforward we can directly connect like this and here we have to go to the setting and under the setting we have to only select the link service and the sp so this is very straightforward so in the link service we have already created this in the previous video so i am going to utilize the same not going to create the again and again the same link service now go to on the stroke procedure so in the stroke procedure we can see this sp underscore logging detail but this sp is asking some input parameter so we can click on this import so it will be having all the input parameters that you can see here so how we can pass the values there so for the dv name if you can click on this value and here we can see the add dynamic content so let me click on that here we can see the parameter function and the system variables so for the dv name it will be coming from the parameter directly so let me select the database click on ok next is the pipeline name so pipeline name should be available under the system variable if we can go here then we can see the pipeline name then we can click on ok next is the run and let so let me go here and under the system variable so this is the pipeline trigger time you can click on ok next we have the run id so let me go here go to the system variable and let me find out for the run id click on ok then we have the start time so let me go and try to select that again and click on ok then we can see the server name so server name is not the system variable it should be coming from here so let me click on ok last is the trigger type so let me go here under the system variable let me try to find out the trigger type here so this is the trigger type and let me click on ok so we have set up each and every input parameter here so while we are going to execute this so let me publish this first and then after we will be try to run this pipeline so data will be going to load like this copy data will be executed first and after that this stroke procedure will be executing and it will be utilizing all the system variables and parameter and inserting data into the logging table let me try to trigger it now it is asking all these values so let me provide all these values db name that is ssu dev then the user id we can pass the user id then the password we can also pass the password here then the table name table name will be the employee table then we can click on ok so it will be start executing we can view this pipeline so here copy data is executing let me refresh it so copy data is completed now this stroke procedure task is executing let me refresh this so it got filled let me check the error so again it is asking for this ip is not allowed so let me add the ip so ip is added let me rerun this fail activity let me click on ok so it is executing now let me refresh it so here we can see this stroke procedure is executed successfully now let me go inside the ssms and let me try to refresh this so it will be refreshing so here as we can see data is inserted in this table so this is the pipeline name then this is the run id this is the trigger type then run start date run end date server name and the db name so all these login informations are inserted into the table so here we are getting this information from the system variables and the parameters that we are passing at the time of execution so i hope guys you have understand how we can use the system variables and if you have still any doubt then you can comment your questions in the comment box see you in the next video