简体   繁体   English

Azure Datalake Gen2 作为 Azure 数据资源管理器的外部表

[英]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.

相关问题 Azure Datalake Store Gen2中的数据屏蔽 - Data masking in Azure Datalake Store Gen2 SQL Polybase 可以从 Azure datalake gen2 读取数据吗? - Can SQL Polybase read data from Azure datalake gen2? 如何将 datalake gen1 数据集迁移到 azure 数据工厂中的 datalake gen2? - How to migrate datalake gen1 datasets to datalake gen2 in azure data factory? azure 数据湖 (gen2) 日志中的用户 ID - Userid in azure datalake (gen2) log Spark 可以写入 Azure Datalake Gen2 吗? - Can Spark write to Azure Datalake Gen2? azure datalake gen2 databricks ACL 权限 - azure datalake gen2 databricks ACLs permissions 通过 Azure 函数中的 C# 将文件从一个 DataLake Gen2 复制到另一个 Data Lake Gen 2 - Copy file from one DataLake Gen2 to another Data Lake Gen 2 via C# in Azure Functions 在没有 Azure DataFactory 的情况下将文件和文件夹从 Azure DataLake Gen1 复制到 Azure DataLake Gen2 - Copy files and folders from Azure DataLake Gen1 to Azure DataLake Gen2 without Azure DataFactory Azure Databrics - 从 Gen2 DataLake 存储运行 Spark Jar - Azure Databrics - Running a Spark Jar from Gen2 DataLake Storage 发送 Azure Iot 数据到 azure gen2 - Send Azure Iot data to azure gen2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM