Hello,
I want to merge two rows containing different fields, is it possible?
The result of my query is:
| field1 | field2 | fileld3 | field4 |
| 1 | 4 | | |
| | | 5 | 7 |
But I want to get:
| field1 | field2 | fileld3 | field4 |
| 1 | 4 | 5 | 7 |
Is there a transformation that I can use?
Hi @eloparco
You can use the join function do to this as long as you have one column whose value is unique to just the records you want to join.
Thanks, that’s what I was about to do.
Since the two rows are coming from different measurements I can have two separate streams, add a fake common column and then do the join.
I was wondering if there was a more direct way without having to generate two separate streams and then join them.
Depending on what data you have to create our fake column out of, you may be able to do this with group() in a single query
I didn’t find any way to achieve it with the group()
operator. The data is similar to what I put in the example.
Can you share the Flux queries you have for both sets of data?
No sorry I can’t, but in the end I used the join()
, thanks to a fake attribute that I add to both the measurements (since otherwise they have nothing in common).
Thank you for your help!