Azure ADF - Array elements can only be selected using an integer index

Viewed 11108

Hi I am trying to select Status from Json Array in azure data factory

{
    "dataRead": 2997,
    "dataWritten": 2714,
    "filesWritten": 1,
    "sourcePeakConnections": 1,
    "sinkPeakConnections": 1,
    "rowsRead": 11,
    "rowsCopied": 11,
    "copyDuration": 3,
    "throughput": 0.976,
    "errors": [],
    "effectiveIntegrationRuntime": "DefaultIntegrationRuntime (East US)",
    "usedDataIntegrationUnits": 4,
    "billingReference": {
        "activityType": "DataMovement",
        "billableDuration": [
            {
                "meterType": "AzureIR",
                "duration": 0.06666666666666667,
                "unit": "DIUHours"
            }
        ]
    },
    "usedParallelCopies": 1,
    "executionDetails": [
        {
            "source": {
                "type": "AzureSqlDatabase",
                "region": "East US"
            },
            "sink": {
                "type": "AzureBlobStorage",
                "region": "East US"
            },
            "status": "Succeeded",
            "start": "2020-03-19T06:24:39.0666585Z",
            "duration": 3,
            "usedDataIntegrationUnits": 4,
            "usedParallelCopies": 1,

I have tried selecting @activity('Copy data From CCP TO Blob').output.executionDetails.status.It throws an error:

'Array elements can only be selected using an integer index'.

Any way to resolve it?

2 Answers

executionDetails is an array, you have to set index to refer elements in it.

Please try:

@activity('Copy data From CCP TO Blob').output.executionDetails[0].status

Thank you for the reply

Yes, we have to use slicing and indexing the lists and Dictionaries

I have tried Dispensing_Unit_Master_Dim

@activity('Copy data From CCP TO Blob').output.executionDetails[0]['status'] and it works

0 and status there is no Dot

Related