T -SQL OpenRowset -DataSource
我正在使用 T-SQL 查询 Azure Data Lake Gen 2 中的存储帐户容器。
目前,我有以下查询,其中我提供了 CSV 文件的完整路径:
SELECT *
FROM OPENROWSET(BULK 'https://xxxxxxxxxx.blob.core.windows.net/[CONTAINER]/[GUID]/CustomerActivity/*.csv',
format = 'CSV', parser_version = '2.0')
如何使用“datasource”参数来指定存储帐户?我尝试使用 datasource ='https://xxxxxxxxx.blob.core.windows.net'
但它不起作用
I am using T-SQL to query a storage account container in the Azure Data Lake Gen 2.
At the moment I have the following query where I supply the entire path to the CSV file:
SELECT *
FROM OPENROWSET(BULK 'https://xxxxxxxxxx.blob.core.windows.net/[CONTAINER]/[GUID]/CustomerActivity/*.csv',
format = 'CSV', parser_version = '2.0')
How do I use the 'datasource' parameter to specify the storage account? I tried using datasource ='https://xxxxxxxxxx.blob.core.windows.net'
but it didn't work
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,我必须在Azure SQL中创建一个外部数据源,以使用Azure Syapse Analytics中的无服务器SQL池读取数据
https://learn.microsoft.com/en-us/azure/sazure/synapse-analytics/sql/sql/develop-tevelap--tevelap--tevelop-tevelop-tevelap--explock-external-terners-tbable? tabs = hadoop
我使用了以下脚本:
并且能够使用data_source for OpenRosset引用它
Turns out I had to created an external data source in Azure SQL to read data using serverless SQL pool in Azure Syapse Analytics
https://learn.microsoft.com/en-us/azure/synapse-analytics/sql/develop-tables-external-tables?tabs=hadoop
I used the following script:
and was able to reference it using data_source for OPENROWSET