How do you capture file creation data (date, person, size, etc) for files uploaded to a data lake storage account?

Lea Calvin 40 Reputation points
2024-01-30T14:40:20.3533333+00:00

We have users uploading files to containers in a data lake storage account. We will have Azure Functions triggered when those files are uploaded and need to access the created date, created by, file size, etc of the file that was uploaded. Is that data stored somewhere in Azure?

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,535 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2024-01-30T15:34:07.16+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    In addition to the data payload provided by a trigger (such as the content of the queue message that triggered a function), many triggers provide additional metadata values. These values can be used as input parameters in C# and F# or properties on the context.bindings object in JavaScript.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-expressions-patterns#trigger-metadata

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **

    0 comments No comments

  2. Adharsh Santhanam 6,015 Reputation points Volunteer Moderator
    2024-01-30T16:00:41.7766667+00:00

    Hello @Lea Calvin These metrics that you're asking for is collected by the monitoring service which you can access and query for. Check this article which will give you the different metrics you can look at for authenticated operations to your endpoint - https://learn.microsoft.com/en-us/azure/storage/blobs/monitor-blob-storage-reference#fields-that-describe-how-the-operation-was-authenticated. With this, you can get the user who made the operation (through requester/objectId, requester/upn etc.). Similarly, some of the other metrics relating to file size etc. can be obtained from here - https://learn.microsoft.com/en-us/azure/storage/blobs/monitor-blob-storage-reference#fields-that-describe-the-service. If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.