0

If I have some influx data like:

testMes,feed=test,sourcetype=type1 records=5 testMes,feed=test2,sourcetype=type2 records=10 testMes,feed=test3 records=15 

I'm trying to get a list of tag values with key "feed" where the sourcetype tag equals a value "type1". So in the case above I would get just the tag "test". I have tried a query but I know I am way off and after reading the syntax documentation I'm not making progress. Any help on the correct syntax would be appreciated. I have tried:

SHOW TAG VALUES FROM "testMes" WITH KEY="feed" WHERE sourcetype="type1" 
2
  • What is the problem exactly? My guess is that you get empty resultset. Try to use single quotes in WHERE part: sourcetype='type1'. Commented Feb 28, 2019 at 9:48
  • It is just an empty result set like you guessed even with single quotes. I believe I have a working solution by doing the following: SELECT feed, records FROM "testMes" WHERE "sourcetype"='type1' GROUP BY feed Commented Feb 28, 2019 at 12:55

1 Answer 1

2

you were very close :-) the correct syntax is ..

show tag values from "testMes" with key = "feed" where sourcetype = 'type1'

Sign up to request clarification or add additional context in comments.

1 Comment

was it really just the single quotes at the end? I was sure I tried that but I guess not. Thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.