Reputation: 3392
I simplified original code to make things clearer.
I've created a one field table:
.create table testtbl (dummy: string)
Then I tried to ingest inline a small JSON document:
.ingest inline into table testtbl with (format="json", ingestionMapping =
'['
' {"column": "dummy", "path": "$.test"}'
']') <|
'{"test": "this is a test"}'
The statement is execute without errors:
But the table remains empty.
What am I missing?
Regards, Giacomo S. S.
Upvotes: 0
Views: 586
Reputation: 25895
Looking at the documentation for ingestion mappings, the format you use in your mapping is different. You may want to adjust it (e.g. It doesn't include the "properties" property bag). See: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/management/mappings#example-of-json-mapping
The linebreak and single quotes surrounding your payload (after the "<|") are redundant.
This works:
.create table testtbl (dummy: string)
.ingest inline into table testtbl
with (format = "json", ingestionMapping = '[{"column":"dummy", "Properties":
{"Path": "$.test"}}]')
<|{"test": "this is a test"}
Upvotes: 2