Azure / Webjobs.Extensions.Kusto

Azure functions Input and output bindings for Kusto (ADX)
MIT License
4 stars 6 forks source link

problems converting Kusto Boolean data types. #46

Open ag-ramachandran opened 1 year ago

ag-ramachandran commented 1 year ago

problems converting Kusto Boolean data types.

Given this table structure, where the property IsHealthy is of type bool:

image

If I create an input binding with casting to my typed class:

image

With the Heartbeat record being:

I get this Exception:

image

As it turns out, the input binding cast logic seems to convert a boolean in to a Number:

image

(If I temporarily let it convert to an Enumerable of Objects instead):

image

That would explain the above Exception.

Now, my workaround is to assign a Custom Converter to that Boolean property:

Then it seems to work fine.