Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

objects written as "mixed" instead of "number" #123

Open
kubax opened this issue Apr 28, 2023 · 3 comments
Open

objects written as "mixed" instead of "number" #123

kubax opened this issue Apr 28, 2023 · 3 comments

Comments

@kubax
Copy link

kubax commented Apr 28, 2023

The objects are written as "mixed" instead of "number" preventing (e.g.) sourceanalytix to calculate with the data.

Would you mind switching to numbers with units, instead of writing the unit to the object itself?

@lvogt
Copy link
Owner

lvogt commented May 1, 2023

The adapter uses numbers + units.
However due how old the actual telegram parser code is, it generates in many cases "strings" because it truncates numbers to the amount of decimal places you would expect. Additionally there are quite a few combinations where you need to keep track of data type while parsing the raw data but this is just not implemented in the current parser code.

I am working for quite some time and from time to time ;) on a complete rewrite for the telegram parser, but I have trouble finding a approach which I am satisfied with. Whenever this will be finished the state type will probably be correct.

A possible workaround is using the alias adapter. However, I feel like this is actually an issue of sourceanalytix. The state is "mixed" - not string! As far as I remember from reading about this, when I was "forced" to set the state type, mixed means it can be either number, string, ... - So sourceanalytix should make an effort and try to parse the state into a number!

@kubax
Copy link
Author

kubax commented May 4, 2023

Thanks for the hint with the alias plugin, i got it working with that.

sadly it doesn't seem like sourceanalytix is willing to put an effort into parsing the mixed values. i just opened a ticket here, because i found a similar ticket from another guy on their repo, and they refused and refered to the plugin developer of the other plugin.

nevertheless i can totaly live with the alias plugin, and also i learned something new :)

i will not close this, because it is technically not closed, and i don't know if you want to keep track of it. But if you want to close it because you are aware of it and try to fix is sometime, i'll be perfectly fine with that.

Thanks again for you efforts!

@lvogt
Copy link
Owner

lvogt commented May 8, 2023

Glad to hear the workaround actually works ;)

We can leave this open as a reminder and "documentation" for anyone else with the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants