Discussion:
[influxdb] the sum of string field of decimal number
Suda Yukinori
2015-06-11 06:37:15 UTC
Permalink
Hello,

Many DBs basically support cast() function.
So we can get the sum of string field by using cast(field AS int)

In the latest version, InfluxDB does not seem to support cast() function
and the sum of string field is empty.

Does InfluxDB have a plan to support cast() function in the future release?

Thanks

suda
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/768a2c57-52d9-45dc-bd82-4e5043a23039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yukinori SUDA
2015-06-11 07:51:11 UTC
Permalink
Hi Sean,

thanks for your quick response.

I filed the issue.
https://github.com/influxdb/influxdb/issues/2911/

I'm looking forward to implementing this function.

Thanks,

suda
There are no issues filed requesting that feature so it is not currently
planned.
If you would like to have this feature, please open a feature request
issue on GitHub: https://github.com/influxdb/influxdb/issues/new
Post by Suda Yukinori
Hello,
Many DBs basically support cast() function.
So we can get the sum of string field by using cast(field AS int)
In the latest version, InfluxDB does not seem to support cast() function
and the sum of string field is empty.
Does InfluxDB have a plan to support cast() function in the future release?
Thanks
suda
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/768a2c57-52d9-45dc-bd82-4e5043a23039%40googlegroups.com
<https://groups.google.com/d/msgid/influxdb/768a2c57-52d9-45dc-bd82-4e5043a23039%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/CALGqCvOekD-BgTwZfJfcxw6NGLL2%3D6U1b0k%3Dt63ubELnaEDXVA%40mail.gmail.com
<https://groups.google.com/d/msgid/influxdb/CALGqCvOekD-BgTwZfJfcxw6NGLL2%3D6U1b0k%3Dt63ubELnaEDXVA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CA%2BNeN0x6k4dV1p5wFY4JUu7VvYBf1XUtnfk3rg1EeU1fT9_aSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
p***@greyorange.sg
2016-04-05 09:28:15 UTC
Permalink
Hi Sean,

I have an influxDB database where a field is stored as strings. Now I am in a bit of a predicament as I need to do some aggregation and math functions on this field.

Are there any InfluxDB functions I could use to do this on the string field? I am currently on InfluxDB 9. I can upgrade to a newer version, if that does the job.

Thanks,
Paul John
Post by Yukinori SUDA
Hi Sean,
thanks for your quick response.
I filed the issue.
https://github.com/influxdb/influxdb/issues/2911/
I'm looking forward to implementing this function.
Thanks,
suda
There are no issues filed requesting that feature so it is not currently planned. 
If you would like to have this feature, please open a feature request issue on GitHub: https://github.com/influxdb/influxdb/issues/new
Hello,
Many DBs basically support cast() function.
So we can get the sum of string field by using cast(field AS int)
In the latest version, InfluxDB does not seem to support cast() function
and the sum of string field is empty.
Does InfluxDB have a plan to support cast() function in the future release?
Thanks
suda
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/768a2c57-52d9-45dc-bd82-4e5043a23039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CALGqCvOekD-BgTwZfJfcxw6NGLL2%3D6U1b0k%3Dt63ubELnaEDXVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/1db177ed-4d1c-4439-8adb-160e4ea53b6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
s***@gmail.com
2016-06-22 15:13:31 UTC
Permalink
Hi Sean:

I have similar issue with the data, I stored integers as string accidentally. Can you give me some suggestions on how to export and re-write the data? I couldn't find any documentation regarding import/export from influxdb doc. Also I have 44G of data, which sounds impossible for me to finish it in any time soon. What's the best approach? Thanks!
There is no CAST function, nor is there a way to alter the type of a field after write.
There are open feature requests for both, but until one or both is written I think you will need to export and re-write the data with the proper type.
Hi Sean,
I have an influxDB database where a field is stored as strings. Now I am in a bit of a predicament as I need to do some aggregation and math functions on this field.
Are there any InfluxDB functions I could use to do this on the string field? I am currently on InfluxDB 9. I can upgrade to a newer version, if that does the job.
Thanks,
Paul John
Post by Yukinori SUDA
Hi Sean,
thanks for your quick response.
I filed the issue.
https://github.com/influxdb/influxdb/issues/2911/
I'm looking forward to implementing this function.
Thanks,
suda
There are no issues filed requesting that feature so it is not currently planned. 
If you would like to have this feature, please open a feature request issue on GitHub: https://github.com/influxdb/influxdb/issues/new
Hello,
Many DBs basically support cast() function.
So we can get the sum of string field by using cast(field AS int)
In the latest version, InfluxDB does not seem to support cast() function
and the sum of string field is empty.
Does InfluxDB have a plan to support cast() function in the future release?
Thanks
suda
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/768a2c57-52d9-45dc-bd82-4e5043a23039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CALGqCvOekD-BgTwZfJfcxw6NGLL2%3D6U1b0k%3Dt63ubELnaEDXVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/1db177ed-4d1c-4439-8adb-160e4ea53b6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/e0918c48-3e20-4be9-8b39-ce5e2b9ba5ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
i***@gmail.com
2017-10-19 10:08:45 UTC
Permalink
Basically it looks like there's no way to work with decimals in InfluxDB, is that correct? Currencies cannot be stored as floats due to precision issues and aggregation functions like SUM() will not work for strings. Is that correct or there's a workaround? Have filed a feature request, https://github.com/influxdata/influxdb/issues/8982
There is no CAST function, nor is there a way to alter the type of a field after write.
There are open feature requests for both, but until one or both is written I think you will need to export and re-write the data with the proper type.
Hi Sean,
I have an influxDB database where a field is stored as strings. Now I am in a bit of a predicament as I need to do some aggregation and math functions on this field.
Are there any InfluxDB functions I could use to do this on the string field? I am currently on InfluxDB 9. I can upgrade to a newer version, if that does the job.
Thanks,
Paul John
Post by Yukinori SUDA
Hi Sean,
thanks for your quick response.
I filed the issue.
https://github.com/influxdb/influxdb/issues/2911/
I'm looking forward to implementing this function.
Thanks,
suda
There are no issues filed requesting that feature so it is not currently planned. 
If you would like to have this feature, please open a feature request issue on GitHub: https://github.com/influxdb/influxdb/issues/new
Hello,
Many DBs basically support cast() function.
So we can get the sum of string field by using cast(field AS int)
In the latest version, InfluxDB does not seem to support cast() function
and the sum of string field is empty.
Does InfluxDB have a plan to support cast() function in the future release?
Thanks
suda
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/768a2c57-52d9-45dc-bd82-4e5043a23039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CALGqCvOekD-BgTwZfJfcxw6NGLL2%3D6U1b0k%3Dt63ubELnaEDXVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/1db177ed-4d1c-4439-8adb-160e4ea53b6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/661529b9-c193-4eaa-9b2b-b51cff03156e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
p***@greyorange.sg
2016-04-05 09:29:38 UTC
Permalink
Hi Sean,

I have an influxDB database where a field is stored as strings. Now I am in a bit of a predicament as I need to do some aggregation and math functions on this field.

Are there any InfluxDB functions I could use to do this on the string field? I am currently on InfluxDB 9. I can upgrade to a newer version, if that does the job.

Thanks,
Paul John
Post by Yukinori SUDA
There are no issues filed requesting that feature so it is not currently planned. 
If you would like to have this feature, please open a feature request issue on GitHub: https://github.com/influxdb/influxdb/issues/new
Hello,
Many DBs basically support cast() function.
So we can get the sum of string field by using cast(field AS int)
In the latest version, InfluxDB does not seem to support cast() function
and the sum of string field is empty.
Does InfluxDB have a plan to support cast() function in the future release?
Thanks
suda
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
Visit this group at http://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/768a2c57-52d9-45dc-bd82-4e5043a23039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sean Beckett
Director of Support and Professional Services
InfluxDB
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups "InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/a0e60c1c-a043-4028-b898-efaa9f70422a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...