Forum Discussion
Pipeline - Set Variable activity not working properly
- 2 years ago
Based on my understanding, variables values are only available for current session. we couldn't be used after the session closed. so you will need to store variable "Last_run_date" value in some locations like (blob storage, data lake etc.. as per your convenience).
Please follow the below step :-
1. Choose the lookup activity then configure the connection where have been to store location of variable "Last_run_date".2. Now you choose the webactivity and configure the "Relative URL" as per mentioned in the below:-
api/v1/employees? date = @activity('Lookup').output.value.3. Now you add a variable(Last_run_date) as you mentioned.
4. Then choose the copy activity that help to store "last_run_date" variable. please follow below step to config.
a). Create a dummy dataset as source. go to "additional column" >> add column name like ("Last_run_date")
>>>> go the column value and click on "add dynamically content" then select the variables.
b). Create a sink dataset where to store "Last_run_date" value.
I hope that would be helpful for you.
Based on my understanding, variables values are only available for current session. we couldn't be used after the session closed. so you will need to store variable "Last_run_date" value in some locations like (blob storage, data lake etc.. as per your convenience).
Please follow the below step :-
1. Choose the lookup activity then configure the connection where have been to store location of variable "Last_run_date".
2. Now you choose the webactivity and configure the "Relative URL" as per mentioned in the below:-
api/v1/employees? date = @activity('Lookup').output.value.
3. Now you add a variable(Last_run_date) as you mentioned.
4. Then choose the copy activity that help to store "last_run_date" variable. please follow below step to config.
a). Create a dummy dataset as source. go to "additional column" >> add column name like ("Last_run_date")
>>>> go the column value and click on "add dynamically content" then select the variables.
b). Create a sink dataset where to store "Last_run_date" value.
I hope that would be helpful for you.
- narendranj2 years agoFrequent Visitor
Noted, thanks! Yes, this is how I already implemented the workaround.
Regarding the behavior of the Set Variable activity: I have a different view from its current functionality. I don't see the benefit of holding variable values only for the current session. I believe it should be designed to dynamically update pipeline variable values.- v-cboorla-msft2 years agoMicrosoft Employee
Hi narendranj
Just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others.
If the issue still persist, please do let us know. We will try to help.
Thank you.
- v-cboorla-msft2 years agoMicrosoft Employee
Hi narendranj
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others .
If you have any question relating to the current thread, please do let us know and we will try out best to help you.
In case if you have any other question on a different issue, we request you to open a new thread.Thanks.