Skip to content

Commit 65c7c2e

Browse files
committed
Revert "updated custom activity outputs"
This reverts commit 3cd11e5.
1 parent 52b9647 commit 65c7c2e

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

articles/data-factory/transform-data-using-dotnet-custom-activity.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To move data to/from a data store that Data Factory does not support, or to tran
2929

3030
> [!NOTE]
3131
> This article applies to version 2 of Data Factory, which is currently in preview. If you are using version 1 of the Data Factory service, which is generally available (GA), see [(Custom) DotNet Activity in Data Factory version 1](v1/data-factory-use-custom-activities.md).
32-
32+
3333

3434
See following articles if you are new to Azure Batch service:
3535

@@ -109,9 +109,6 @@ The following table describes names and descriptions of properties that are spec
109109
| referenceObjects | An array of existing Linked Services and Datasets. The referenced Linked Services and Datasets are passed to the custom application in JSON format so your custom code can reference resources of the Data Factory | No |
110110
| extendedProperties | User-defined properties that can be passed to the custom application in JSON format so your custom code can reference additional properties | No |
111111

112-
> [!NOTE]
113-
> From September 1, 2018, linked service containing secrets/ secure strings are not recommended to be passed as referenced objects to the custom activity. We will be allowing only [Azure Key Vault enabled linked services](store-credentials-in-key-vault) to be passed as referenced objects in the future. Please refer to a [Custom activity sample using AKV enabled linked service](https://github.com/nabhishek/customactivity_sample/tree/linkedservice).
114-
115112
## Executing commands
116113

117114
You can directly execute a command using Custom Activity. The following example runs the "echo hello world" command on the target Azure Batch Pool nodes and prints the output to stdout.
@@ -215,10 +212,6 @@ namespace SampleApp
215212
// From LinkedServices
216213
dynamic linkedServices = JsonConvert.DeserializeObject(File.ReadAllText("linkedServices.json"));
217214
Console.WriteLine(linkedServices[0].properties.typeProperties.accountName);
218-
219-
// Send an output to ADF to be consumed by donwstream activities - outputs.json
220-
string someJSON = "{\"Name\":\"someName\",\"Value\":\"someValue\"}";
221-
File.WriteAllText("outputs.json", someJSON );
222215
}
223216
}
224217
}
@@ -283,16 +276,8 @@ namespace SampleApp
283276
"outputs": [
284277
"https://shengcstorbatch.blob.core.windows.net/adfjobs/<GUID>/output/stdout.txt",
285278
"https://shengcstorbatch.blob.core.windows.net/adfjobs/<GUID>/output/stderr.txt"
286-
],
287-
"customOutput": {
288-
"Name": "someName",
289-
"Value": "someValue"
290-
},
291-
"computeInformation": "{\"account\":\"abaccount\",\"poolName\":\"batch_pool\",\"vmSize\":\"standard_a1\"}",
292-
"effectiveIntegrationRuntime": "DefaultIntegrationRuntime (East US)",
293-
"executionDuration": 38486
294-
295-
279+
]
280+
"effectiveIntegrationRuntime": "DefaultIntegrationRuntime (East US)"
296281
Activity Error section:
297282
"errorCode": ""
298283
"message": ""
@@ -301,8 +286,6 @@ namespace SampleApp
301286
```
302287
If you would like to consume the content of stdout.txt in downstream activities, you can get the path to the stdout.txt file in expression "\@activity('MyCustomActivity').output.outputs[0]".
303288

304-
To access the **custom output** from your custom code by writing the **outputs.json** file, use expression "\@activity('MyCustomActivity').output.customOutput". In above case, if you would like to access the 'Name' property from your custom output, then use "\@activity('MyCustomActivity').output.customOutput.Name".
305-
306289
> [!IMPORTANT]
307290
> - The activity.json, linkedServices.json, and datasets.json are stored in the runtime folder of the Batch task. For this example, the activity.json, linkedServices.json, and datasets.json are stored in "https://adfv2storage.blob.core.windows.net/adfjobs/<GUID>/runtime/" path. If needed, you need to clean them up separately.
308291
> - For Linked Services uses Self-Hosted Integration Runtime, the sensitive information like keys or passwords are encrypted by the Self-Hosted Integration Runtime to ensure credential stays in customer defined private network environment. Some sensitive fields could be missing when referenced by your custom application code in this way. Use SecureString in extendedProperties instead of using Linked Service reference if needed.

0 commit comments

Comments
 (0)