Hello @Shubham Jaunjal,
welcome to this moderated Azure community forum.
Both Azure Data Explorer and the KQL query language do not support a decimal number to binary value conversion.
There is also no support for both the byte or byte array data type. You probably need to convert to a string.
The closest conversion is the 'tohex()' function which returns a hexadecimal conversion. this could be the first step into the conversion into a binary format string.
An alternative is making use of a function written in the Python language and available as a plugin for Azure Data Explorer.
Notice you need to enable the Python plugin first at the level of the cluster:
Notice that the first execution will be slow because the plugin must be loaded. A possible solution based on Python is:
range intValue from 20321 to 20321 step 1
| evaluate python(
//
typeof(*, res:string),
result = df result["res"] = bin(int(df["intValue"]))
bag_pack("dummy",42)
)
The result looks like:
Please check for yourself if this is a plausible solution (activating Python) and offers enough execution performance.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.