I'm trying to ingest into a testing table in Kusto.
The table is created using this syntax:
.create table testing(id: string, label: string)
I'm trying to insert inline into this table using the below query:
.ingest inline into table testing <|
"5671343d-8eaa-4939-8225-cb17805868d8","2"
| where id != "5671343d-8eaa-4939-8225-cb17805868d8"
When I try to ingest it normally, it is working. But, when i use the Where statement, to make sure I do not ingest duplicates, the query is failing to execute.
The issue with your query is that the
whereclause is not valid in an inline ingestion command. Thewhereclause is used to filter data in a Kusto query, but it is not supported in an inline ingestion command. To avoid ingesting duplicates, you can use the extent tagsexample:
ingestIfNotExistsin the .ingest commandexample:
Refer MS doc on handling duplicate rows in azure data explorer.