Home > Mobile >  How to get creation datetime of a blob file from Azuredatafactory or Azure Dataflow
How to get creation datetime of a blob file from Azuredatafactory or Azure Dataflow

Time:12-15

enter image description hereI can fetch lastmodified file from get metadata activity but the requirement is the creation date of the file .I can see no option to fetch that in Azure Data Factory . Besides I need to fetch:

First row from   fileCreationDateTime --- Descending Order. So i need the CreationDateTime functionality as LastModified .

As shown in the picture , there are two things CREATION TIME and LAST MODIFIED . So i need to fetch all the creationtimes and sort it to decending and pick the first row.

CodePudding user response:

There is no out of the box functionality to get the file created date in ADF. You would need to write your own custom logic either via Azure function/Azure automation/Databricks etc for this data

CodePudding user response:

You can use Web Activity in ADF and make a call to enter image description here

You can capture the value of Blob creation datetime from the REST API response headers in ADF using below dynamic expression:

@activity('WebGetBlobDetails').output.ADFWebActivityResponseHeaders['x-ms-creation-time']

Here is a sample demo. I have used the hardcoded bearer token in the headers for a quick demo, but you can automate and pass dynamically by having another web activity to get the bearer token before WebGetBlobDetails activity.

Sample GIF:

enter image description here

  • Related