if the query returns json that is the only option you have. Your query needs to return table formatted data. What data source do you use? Looks like elasticsearch. Try latest beta v4.5 we have updated the Elasticsearch datasource so that queries without a date histogram return table formatted data instead of json object