-
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
write data.frame (or list of xts) with influx_write #20
Comments
This would be cool, writing each row with separate request is quite inefficient. Are you planning to merge this feature to master soon? |
I haven't started coding the required parsing scheme because it is out of my use case. I can't tell when I'll begin to implement that feature. However, it is on my "todo"-list (thus this issue). |
@deric btw: Do you prefer one way over the other? |
The first one makes more sense to me. As I'm looking at the I'd like to have something like this: myxts <- xts(x = df[, c("value1", "value2")], order.by = df$time)
influxdbr::influx_write(con = con, db = dbname,
xts = myxts, measurement = "measure",
tags = df[, c("tag1", "tag2")]
) Currently all development is done in |
YES/NO. From now on, all development takes places in "dev" (#13 shows more information about the why).
YES. After some final tests, this will be happen shortly. Submitted version will be in branch "master".
NO. Please feel free to start working in dev branch (which I've just created). Thank you! |
I would also prefer the first solution. Thank you for your work solving this problem. Maybe you could implement the specify which columns are tags, fields and time with the group_by and nest function: |
I'm experimenting a bit how to design the function call in dev branch. I think the easiest way would be to have a |
Could you provide a simple example? How does |
Data:
the result would be (data %>% group_by(country,city) %>% nest):
So you can use the nested dataframes as fields (+ time) and the others as tags. |
How about: |
This is a good solution. I like to have the possibility to use it like this:
The only reason why I brought a nested way into play was the attempt, to add the information of tag_cols = c("country", "city") into the data. It was a maybe to complicated idea, to fulfill the idea of adding every information to the dataframe (vgl. tidyverse idea). |
current dev branch has a new generic Any feedback is greatly appreciated:) |
The code looks really good. I can offer you to test it in the next week. |
I installed the development version but I get errors: Query: |
Could you please post the column types with |
'data.frame': 6660 obs. of 14 variables: |
Yep, error reproducible (special characters in tag values) and fixed. Can you confirm? |
Problem is still not fixed (or I'm not able to use the feature) |
Did you restart your R session? Do you get exactly the same error message? |
for the record and to compare insert statements (new escapes spaces in tag values):
|
sorry my fault. It is working Speedtest |
xts matrix objects fail to support to write tag values per field value (#19).
There are probably two ways to solve this:
The text was updated successfully, but these errors were encountered: