.NET core/Python Read first X lines from Azure Storage Blob(.NET core/Python 从 Azure Storage Blob 读取前 X 行)
问题描述
我有一个大的 blob,我需要从中提取前几行.我可以在不打开整个文件的情况下执行此操作吗?
I have a large blob which I need to extract the first few rows from. Can I do this without opening the entire file?
文件采用已知格式(通常为 Excel,有时为 .csv 或 .tsv).
The file is in a known format (typically Excel, sometimes .csv or .tsv).
仅仅知道它是否可能会非常有帮助.在搜索 MS 和其他论坛时,我根据日期获得了不同的答案.谢谢!
Just knowing if it is possible would be extremely helpful. I've obtained mixed answers, based on date, while searching MS and other forums. Thank you!
推荐答案
我有一个大的 blob,我需要从中提取前几行.我可以在不打开整个文件的情况下执行此操作吗?
I have a large blob which I need to extract the first few rows from. Can I do this without opening the entire file?
答案是肯定的和否定的.是的,你可以阅读部分内容,但是你不能阅读前几行.
The answer is both yes and no. Yes, you can read partial contents however you can't read the first few lines.
本质上,Blob 存储服务允许您执行范围读取,您可以在其中指定要读取的数据范围(起始字节和要读取的字节数).在请求中指定范围后,Azure 存储将仅返回这些字节.
Essentially Blob Storage Service allows you to perform a range read where you can specify the range of data (starting bytes and number of bytes to read) that you want to read. Once the range is specified in the request, Azure Storage will only return those bytes.
如果您使用的是 .Net SDK,请查看 DownloadStreaming
方法.
If you're using .Net SDK, please look at DownloadStreaming
method.
这篇关于.NET core/Python 从 Azure Storage Blob 读取前 X 行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:.NET core/Python 从 Azure Storage Blob 读取前 X 行
基础教程推荐
- 将 XML 转换为通用列表 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- MS Visual Studio .NET 的替代品 2022-01-01