Abnormal behaviour when inserting very large value in decimal column in azure data explorer

Kamaljit Pati 1 Reputation point
2020-06-23T10:39:32.013+00:00

So I tried to ingest very large values in decimal column of azure data explorer, it succeeded. But then when I tried to fetch the rows it is showing empty. I ran the following queries :

.create table test_decimal_table(id:decimal)
.ingest inline into table test_decimal_table <| 99999999999999999999999999999999999999
test_decimal_table

So it is showing no rows. I mean if it is not allowed then it should have thrown an exception or something. But it is being successful and then it is not showing anything. And if I do this with some other data in the same column means like below :

.ingest inline into table test_decimal_table <| 99999999999999999999999999999999999999
.ingest inline into table test_decimal_table <| 23.67

Then if try to fetch the rows by running test_decimal_table command then

1 time it is showing only 23.67 and again it is showing no rows and again it is showing 1 row and again no rows. Does anyone has any idea about this.

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
479 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Alexander S 1 Reputation point Microsoft Employee
    2020-06-23T11:37:58.967+00:00

    When working with decimals, you should be using decimal() literals.
    For example:

    .create table test_decimal_table(id:decimal)
    .set-or-append table test_decimal_table <| print id=decimal(1234)
    .set-or-append table test_decimal_table <| print id=decimal(1234.567)
    test_decimal_table

    0 comments No comments

  2. MartinJaffer-MSFT 26,021 Reputation points
    2020-06-26T20:17:32.67+00:00

    From my testing, the maximum ingested this way is
    .ingest inline into table test_decimal_table <| 9999999999999999999999999999999999
    That is 34 , 9's

    0 comments No comments