Forum Discussion

fabric_user's avatar
fabric_user
Icon for Advocate I rankAdvocate I
1 year ago
Solved

Eventstream -> KQL. How to convert string to decimal number?

Hi,

 

I am using the Stock market sample data to ingest Eventstream data into a KQL database. In the event processor, I choose the data type of the columns. Most columns are initially detected as strings. However, I wish to create a real-time dashboard with a line chart, so I wish to show the numeric values on the Y axis. I select the Double type for all the decimal numbers. I don't get any errors when saving the eventstream, and data is being pushed into the KQL database table.

 

However, the Double columns get interpreted as Dynamic in the KQL database table, and I cannot use them on the Y axis of the real time dashboard.

 

What can I do to use the values, for example the lastSalePrice, on the Y axis in the real time dashboard?

 

Anyone knows?

 

 

Thanks!


Eventstream event processor:

 

KQL database table schema:

 

  • datacoffee's avatar
    datacoffee
    1 year ago

    In theory yes, but you won't feel it in any way at all.

    This is not the usual SQL lookalike world with read problems and convertion issues 😉

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi fabric_user ,

    I'm glad to see that you solved your problem.
    Generally speaking, "manage fields" only changes the data type in the eventstream. When the data is passed to the KQL database, its data type is still affected by the limitations of the KQL database itself. So it is better to convert it in the KQL database using Kusto Query, which has more powerful functions.
    Also, please don't forget to accept your reply as a solution so that other users can find the solution and learn faster.

    Best Regards,
    Dino Tao

9 Replies