将文件系统中的 Parquet 文件读取到本地 SQL Server 表

发布于 2025-01-15 17:26:24 字数 980 浏览 1 评论 0原文

有大量有关从 Azure blob 存储的 parquet 文件获取数据到本地 MSSQL 实例的文档。

例如 https://www.c-sharpcorner.com/article/external-tables-in-sql-server-2016-or-2017-and-work-with-polybase/ 创建外部数据源。

-- Creating External Data Source  
CREATE EXTERNAL DATA SOURCE PolybaseDS  
WITH (  
TYPE = HADOOP,  
LOCATION = 'wasbs://[email protected]', -- Please change with your container and storage account  
CREDENTIAL = AzureStorageCredential)  

是否有使用外部表从本地文件系统中的 parquet 文件而不是 blob 存储中提取数据的等效方法或方式?

SSIS/Powershell 解决方案也很棒,但 SSIS 没有内置 parquet 连接器,因此这可能是一个稍微做作的 C# 脚本任务。作为测试,我设法使用 Power Query 导入数据,但这对于自动化来说并不是很好。

There is a large amount of documentation available on getting data from an parquet file from Azure blob storage to an on-prem MSSQL instance.

E.g. https://www.c-sharpcorner.com/article/external-tables-in-sql-server-2016-or-2017-and-work-with-polybase/ creating an external data source.

-- Creating External Data Source  
CREATE EXTERNAL DATA SOURCE PolybaseDS  
WITH (  
TYPE = HADOOP,  
LOCATION = 'wasbs://[email protected]', -- Please change with your container and storage account  
CREDENTIAL = AzureStorageCredential)  

Is there an eqivalent method or way of using external tables to pull data from a parquet file in the local filesystem rather than blob storage?

SSIS/Powershell solutions would also be great, but SSIS doesn't have a built-in parquet connector so that would probably be a slightly-contrived C# script task. As a test I managed to import the data using Power Query, but it's not great for automation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文