Help with a query

Hi

I need some help writing a query, I have a tag value named “identifier” that is made up of two values separated by a “” For example:
Peter_Grayson
I’d like a query that returned only the first section of the tag value, before the “
”. I’d also like another query that returned the section after the “_”. So the first query in the example would return “Peter” and the second would return “Grayson”

Could anyone help me with this, if it’s actually possible?

I’m actually not sure that’s possible in InfluxQL, but you could obviously pull the raw data into something like pandas and parse accordingly.

The system allows for globbing on tag keys but not on the values they return. I would defer to @jackzampolin to confirm/deny though.

@peter.grayson I’m afraid that @sebito91 is right on this one. I would suggest breaking your tag into a first_name and last_name.

Thanks for the reply, I already have tags for first and last name. I was trying to use this combined method to get around another limitation.

Back to the drawing board

thanks

Pete