Thanks @tkupari. I can reproduce the error. From what I can tell, this should work but I may be missing something. You should submit an issue to the Flux repo.
I talked with the Flux engineers and this appears to, in fact, be a bug… specifically with the typing system. The good news is that they’re in the process of refactoring the typing engine to be smarter and much more robust. The bad news is that it’s not a quick fix.
There is a workaround, although it’s not ideal. You could create two streams, one that filters data with the column and one that filters data without. Then create a union of the two streams:
It’s not the most performant of queries, but it’s a temporary workaround for what you’re trying to do. Be sure to filter each stream to the specific dataset you want to add the column to. This will help to optimize the query.
Thanks @scott! I’m afraid this might not be feasible in our use case as we are doing calculations with 5 different values which could all be missing, and if I understood correctly it would require 10 streams. I think we can filter out the missing data for now.
Thanks in advance for all your time you are putting into supporting users!!
After years of annoying weird-name-entity-filters I finally managed to add friendly names in influxdb. Unfortunately, values recorded pre-friendly_name-tag do not have this “friendly_name” column.
I can merge the pre-friendly_name and post-friendly_name values from the same entity. But when I want to have several entities in one chart I cannot group in “entity x pre-friendly_name and post-friendly_name” and “entity y pre-friendly_name and post-friendly_name” to merge. The merge goes haywire as it merges all values.
So I went for the solution mentioned in this thread. Thank you very much again for this one. The Problem is:
|> filter(fn: (r) => not exists r.friendly_name)
|> map(fn: (r) => ({r with friendly_name: "Zi_kl_Ost_Temp"}))