简体   繁体   English

在逻辑应用中按降序列出 azure blob

[英]List the azure blobs in descending orders in logic apps

I have thousands of azure blobs in my container.我的容器中有数千个 azure blob。 I want to get the list of these azure blobs in my logic apps and then do the filtering.我想在我的逻辑应用程序中获取这些 azure blob 的列表,然后进行过滤。 However, I am unable to get all the list of these azure blobs.但是,我无法获得这些 azure blob 的所有列表。 Probably, there are some limits on how many lists of azure blobs I can get.可能我可以获得多少 azure blob 列表有一些限制。 Getting the latest azure blobs list is critical.获取最新的 azure blob 列表至关重要。 So, I was thinking if I cannot get all the list of blob storage, then listing the blob storage in descending order by date so that I can get information on the latest blobs.所以,我在想如果我不能获得所有的 blob 存储列表,然后按日期降序列出 blob 存储,以便我可以获得有关最新 blob 的信息。 I don't seem to find how to do this in logic apps.我似乎没有在逻辑应用程序中找到如何做到这一点。 Is there any way that I can configure my logic apps so that I can list the azure blobs in descending order by date?.有什么方法可以配置我的逻辑应用程序,以便我可以按日期降序列出 azure blob? Any suggestions would be great.任何建议都会很棒。

I have not used Logic Apps so I will answer from general storage service usage point of view.我没有使用过逻辑应用程序,所以我将从一般存储服务使用的角度来回答。

However, I am unable to get all the list of these azure blobs.但是,我无法获得这些 azure blob 的所有列表。 Probably, there are some limits on how many lists of azure blobs I can get.可能我可以获得多少 azure blob 列表有一些限制。

Each call to storage service to get the list of blobs will return a maximum of 5000 blobs.每次调用存储服务以获取 Blob 列表将返回最多 5000 个 Blob。 If there are more than 5000 blobs, then the storage service also returns a continuation token and you must use that to fetch the next set of blobs.如果有超过 5000 个 Blob,则存储服务还会返回一个延续令牌,您必须使用它来获取下一组 Blob。 I have not used Logic Apps so I am not sure how you would do it there but you will need to do this somehow ie try listing the blobs.我没有使用过逻辑应用程序,所以我不确定您将如何在那里执行此操作,但您需要以某种方式执行此操作,即尝试列出 blob。 Save the blobs list somewhere and check for continuation token.将 blob 列表保存在某处并检查延续令牌。 If you get a continuation token, use that to get next set of blobs.如果你得到一个延续令牌,用它来获取下一组 blob。 Keep on repeating it till the time you don't get continuation token.继续重复,直到你没有得到延续令牌。 Then you will have a list of all blobs.然后,您将获得所有 blob 的列表。

Is there any way that I can configure my logic apps so that I can list the azure blobs in descending order by date?.有什么方法可以配置我的逻辑应用程序,以便我可以按日期降序列出 azure blob?

Again, blob storage only returns blobs order by blob name in ascending order.同样,blob 存储仅按 blob 名称升序返回 blob 顺序。 No other kind of server-side sorting is allowed unfortunately.不幸的是,不允许其他类型的服务器端排序。 Once you have the list of the blobs, you will need to sort them in Logic App only by blob's created date property.获得 blob 列表后,您将需要在逻辑应用程序中仅按 blob 的创建日期属性对它们进行排序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM