[英]Azure Datalake Gen2 as external table for Azure Data Explorer
We have CSV files in Azure Data lake Gen 2 under partitioned folder, so there will be multiple CSV files for a single large table.我们在 Azure Data Lake Gen 2 中的分区文件夹下有 CSV 文件,因此单个大表将有多个 CSV 文件。 We want to consume these files in Azure Data Explorer by creating an external table.我们希望通过创建外部表在 Azure 数据资源管理器中使用这些文件。 so I am using below script to create an external table in ADX:所以我使用下面的脚本在 ADX 中创建一个外部表:
.create external table TestAdx
(
id: int,
name: string,
designation: string
)
kind=adl
dataformat=csv
(
h@'abfss://containername@storageaccountname.dfs.core.windows.net/staging/textadx;token=<<generating using .net API>>'
)
with
(
docstring = "Docs",
folder = "ExternalTables",
namePrefix="Prefix"
)
I am able to execute this query and the external table is created but when I try to fetch data from this table it is giving below error:我能够执行此查询并创建外部表,但是当我尝试从该表中获取数据时,出现以下错误:
Semantic error: 'TestAdx' has the following semantic error: '' operator: Failed to resolve table or column or scalar expression named 'TestAdx'.语义错误:“TestAdx”具有以下语义错误:“”运算符:无法解析名为“TestAdx”的表或列或标量表达式。
Also please let me know is this the correct approach to work with ADLS Gen2 file form ADX?另外请让我知道这是处理 ADLS Gen2 文件形式 ADX 的正确方法吗?
what is the query you're running?您正在运行的查询是什么? are you using the external_table()
function?你在使用external_table()
函数吗?
您需要使用external_table("TestAdx")
来访问外部表。
Following is the example for creating external table with Azure Data Explorer with Azure Data Lake Gen 2. I have added the partition key and other parameters.以下是使用 Azure Data Lake Gen 2 使用 Azure 数据资源管理器创建外部表的示例。我添加了分区键和其他参数。
.create external table BugsCSV
(
Column1 : string,
Column2 : string,
Column3 : string
)
kind=adl
partition by "State="State
dataformat=csv
(
h@'abfss://containername@storageaccountname.dfs.core.windows.net/path;key'
)
with
(
docstring = "Docs",
folder = "ExternalTables",
compressed=true,
compressiontype="lz4"
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.