2

I have a copy data activity that dynamically adds a datetime suffix to the sink file name, which is based on utcnow(). This corresponds to the start datetime in the copy data activity. I am looking to extract the 'start' element from the executionDetails array in the output:

{
    "dataRead": 0,
    "dataWritten": 86,
    "filesWritten": 1,
    "sourcePeakConnections": 1,
    "sinkPeakConnections": 1,
    "rowsRead": 0,
    "rowsCopied": 0,
    "copyDuration": 4,
    "throughput": 0,
    "errors": [],
    "effectiveIntegrationRuntime": "FXL",
    "usedParallelCopies": 1,
    "executionDetails": [
        {
            "source": {
                "type": "SqlServer"
            },
            "sink": {
                "type": "AzureBlobFS"
            },
            "status": "Succeeded",
            "start": "2019-08-06T12:29:20.477586Z",
            "duration": 4,
            "usedParallelCopies": 1,
            "detailedDurations": {
                "queuingDuration": 3,
                "transferDuration": 1
            }
        }
    ]
}

Assuming the activity is called CopyData, I want to set the value of start to a variable. I am struggling to get this, a simple @activity('CopyData').output.executionDetails.start does not work, telling me to assign an integer value of the executionDetails array. However trying @activity('CopyData').output.executionDetails[3] errors telling me the range is (0,0). I am looking for a method to extract the datetimestamp into a string variable.

I can store executionDetails in an array variable, but still unable thereafter to extract the start value.

1 Answer 1

2

Already worked it out, there range is 0,0 because there is only 1 array in executionDetails containing various values. So, I just need to call the array with [0] and then call the start value, so:

@activity('CopyData').output.executionDetails[0].start

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.