Closed Gbertaz closed 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
Thank you for your feedback. This has been routed to the support team for assistance.
I found the way how to set activity dependency. Here is the working code:
ActivityDependency dependency = new ActivityDependency(notebookActivityName, new List<DependencyCondition>() { DependencyCondition.Succeeded });
SetVariableActivity setActivity = new SetVariableActivity(notebook.SetVariableActivityName);
setActivity.VariableName = "NotebookOutput";
setActivity.Value = $"@activity('{notebookActivityName}').output.status.Output.result.exitValue";
setActivity.DependsOn.Add(dependency);
pipelineResource.Activities.Add(setActivity);
@Gbertaz Thanks for getting back and providing an update. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.
Library name and version
Azure.Analytics.Synapse.Spark 1.0.0-preview.8
Query/Question
Hello!
I have a Notebook which returns a string and I am running it in a Pipeline. Ho can I pass the Notebook's output to the pipeline and read that value in code?
I created the same flow in Synapse workspace and it works fine. I have a Notebook activity and a Set variable activity as you can see in the images. Please find the following code example I am using. I get the following error:
The part of the error
...must either be in 'runAfter' path...
sounds like the Set variable activity must be set as dependent on the Notebook activity with conditionSucceeded
. But I am not able to set this dependency on code. PropertyDependsOn
inActivity
class of SDK is read-only and I don't see any set method.Thank you!
Environment
No response