-
Notifications
You must be signed in to change notification settings - Fork 34
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
[BUG] Setting precision in influx_write returns an error #25
Comments
Sorry, I can't reproduce without data. How does the |
I will post a reproducible example today.
…On Tue, Aug 15, 2017 at 6:31 AM, Dominik Leutnant ***@***.***> wrote:
Sorry, I can't reproduce without data. How does the zoo::index(x) look
like?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKwqi0vK0fa_MQ3G8mS8v2RaTB_je-2ks5sYYGngaJpZM4O3PEb>
.
|
Could you please post the code to generate the xts object you are trying to write? Especially, the index of interest, coredata can contain dummy values, e.g. |
My apologies. The last test data set was blank. Here is the correct file. You can use > head(testData)
ordId ordRootId px size bidPx askPx desiredRootPx
2017-07-17 09:30:00 11 11 0.78326 3000 NA NA 0.783265
2017-07-17 09:31:00 17 17 0.78319 5000 NA NA 0.783195
2017-07-17 09:57:00 72 72 0.78173 3000 NA NA 0.781735
2017-07-17 09:59:00 81 81 0.78178 8000 NA NA 0.781785
2017-07-17 10:00:00 88 81 0.78183 8000 NA NA 0.781785
2017-07-17 10:03:00 91 91 0.78174 3000 NA NA 0.781745 Some other info: > tail(diff(.index(testData)))
[1] 5220.097 1319.932 62280.164 1739.899 2520.053 19919.924 So clearly sub second precision |
@ckatsulis I would be happy if you could check the dev version of influxdbr. Does the error still occur? |
Will do that now. Thanks.
…On Sun, Aug 20, 2017 at 11:02 AM, Dominik Leutnant ***@***.*** > wrote:
@ckatsulis <https://github.com/ckatsulis> I would be happy if you check
the dev version of influxdbr. Does the error still occur?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHKwqj9GoVHRuwCYc6EftubmkXcYVlcJks5saFidgaJpZM4O3PEb>
.
|
Pulled the dev version and set precision to devtools::install_github("dleutnant/influxdbr@dev") That did the trick. Thanks for the quick turn around. |
* cran submission * update description to indicate dev version * Fix coercion error in influx_write()` in case of sub-second accuracy (#25). * `influx_select()` correctly parses integer arguments (#27) * typo * significant parsing speed improvement (naming series columns at later stage) * Update NEWS.md * prepare merge with master * prepare merge with master
If sub-second precision is specified in the
xts
index, it appears that granularity is not translated by default to the db throughinflux_write()
; e.g. items get clipped at the second level and it results in sub-second data being overwritten by influxdb.I then changed precision in the
influx_write()
call toms
and received the following error. My guess would be that time is specified in the write line syntax only in integer form and the correct precision must be provided along with the appropriately convertedxts
index vector (e.g. epoch second, ms, us, ns)Do you know why this is happening?
The text was updated successfully, but these errors were encountered: