Azure / azure-kusto-samples-dotnet

Azure Data Explorer (ADX) sample code
MIT License
54 stars 41 forks source link

StreamingIngestionSample fails to populate timestamp field in adx table #5

Closed kiranpradeep closed 10 months ago

kiranpradeep commented 4 years ago

StreamingIngestionSample works correctly without any changes. Then I minimally modified the StreamingIngestSample by replacing DateTime.Now (line 193) with new DateTime(1970, 1, 12). The sample still works correctly.

But, if I replaceDateTime.Now with new DateTime(1970, 1, 13), a new row is created as expected, but the timestamp field is empty. It appear the date is getting treated as month at some place.

I use netCore and nuget version 8.1.5. But, there is no other change I have made to the sample.

yihezkel commented 10 months ago

We apologize for not responding much earlier. Since this was from 2020, it's no wonder the code you ran was from 2019.

I tested it using the latest code, and could not reproduce your issue. Specifically, line 201 (what used to be line 193): tw.WriteLine("{0},{1},{2},{3}", new DateTime(1970, 1, 13), i, "Sample event text ddddddddddddd", "\"{'Prop1':1, 'Prop2': 'Text'}\""); resulted in:

image