In a kusto database I have the following table:
.create-merge table Records (Source:string, Destinitation:string, IsPrimary:bool, MigratedOn:datetime, Count:int)
I’m trying to ingest data into this table using the following command:
.ingest inline into table Records <|
src1, dst1, 1, 2023-04-24, 2041
But the boolean value isn’t being ingested properly, remaining empty.
Source Destinitation IsPrimary MigratedOn Count
src1 dst1 2023-04-24 00:00:00.0000000 2041
What’s the correct way to ingest a boolean colunn?
Better yet, I created json ingestion mapping. How can I use it to ingest from an string json? Meaning to ingest a record represented in json string, not using some uri/url ….
>Solution :
the data provided to the inline ingest command in CSV format shouldn’t included excessive whitespaces.
i.e., you should run either of the following instead (the 2nd uses true instead of 1, for improved readability, but the results are identical)
.ingest inline into table Records <|
src1,dst1,1,2023-04-24,2041
.ingest inline into table Records <|
src1,dst1,true,2023-04-24,2041