Default return value in influxdb query

#1

Hi,

I am no database expert, but i can do sql queries on influxdb at beginners level.

I am wondering if DB query has no results to return,is it possible by any means or functions like IS NULL or coalesce, i can return a default value.

My query pulls the row counts, if the condition matches…but some times there are no records matching the criteria, hence no counts. i need default value to be returned at this point.

Looking forward for possible solution.

Regards,
Rohit

#2

Where are you making queries ? Influx shell OR via python client ?

#3

I am querying from grafana. I also try executing from influx web console.

#4

@rohit This is how the database works. It will not return a default value, just the fact that it found no data.