简体   繁体   中英

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. We want to consume these files in Azure Data Explorer by creating an external table. so I am using below script to create an external table in 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'.

Also please let me know is this the correct approach to work with ADLS Gen2 file form ADX?

what is the query you're running? are you using the external_table() function?

您需要使用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.

.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"
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM