This has to be a bug

TLDR: In a Stream Analytics Job, I can’t seem to CAST stringified integer to float.

img 1

Long version: So I have a Stream Analytics Job, fetching messages from an Azure IoT Hub, formatting and outputting to Postgres. Good? Good! In Postgres, I have a column of type float, where sometimes I insert values with decimals, e.g. 4.3 or 1.5 and sometimes values without decimals (aka integers), e.g. 2 or 4. Good? Good!

What seems to be the officer, problem?

The problem is that while converting values from JSON, the Stream Analytics Job, seems to ignore my cast-action. I explicitly ask to convert ‘0’ to a nice float 0.0 but I always get a bigint instead. This of course causes the data-insertion to break in Postgres.


I asked for help on Tw… X, and I did get help but we couldn’t find a solution.

Microsoft Learn didn’t help either. Pfff…

I don’t have the solution yet, but I promise to update this post once I find one.

UPDATE: I found one! Read here!

This website uses cookies. By continuing to use this site, you accept our use of cookies.