how to identify the newly uploaded files and load that alone in its target storage

Naresh Babu 145 Reputation points
2023-08-02T05:32:55.39+00:00

Hello Team,

Can you help me with the Query.. how to identify the newly uploaded files and load that alone in its target storage. I just looking for a table or query and it should contain FileName, LastModified, BlobContainerName, FolderPath..

thanks in advance!

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,538 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,201 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2023-08-07T15:11:37.5233333+00:00

    @Naresh Babu

    For this type of information I recommend using Azure Blob Storage inventory to get an overview of all your blob data within a storage account, including information like filename, last modified, container name, and folder path. You can generate an inventory report in either CSV or Apache Parquet output format.

    Please checkout this feature and let me know if it fits your needs or if you have anymore questions.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2023-08-04T19:03:56.8133333+00:00

    @Naresh Babu

    It is not entirely clear to me what method you are trying to use to accomplish this. I am providing a possible solution, but please provide more details if that doesn't work for you.

    This example utilizes PowerShell. It is currently set to find all files in the blob storage account that are less than one day old.

    $StorageAccountName = "Name"
    $StorageAccountKey = "key"
    $Context = New-AzStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
    $Containers = Get-AzStorageContainer -Context $Context
    $Output = ""
    foreach ($Container in $Containers) { $Blobs = Get-AzStorageBlob -Container $Container.Name -Context $Context 
    $Blobs = $Blobs | Where-Object {$_.LastModified.DateTime -gt (Get-Date).AddDays(-1)} 
    $Output += $Blobs | Format-Table -Property Name, LastModified, @{Name=“Container”; Expression={$Container.Name}} | Out-String }
    echo $Output
    
    

    Hope this helps! Let me know if you have any follow-up questions.


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A! User's image


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.