Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

NRQL format as table instead of Json

nrql

#1

Hello All
Below Query giving Json Output, Can you please advise how to get the output in a table format instead of JSON.

SELECT uniques(request.headers.host) as 'Host', uniques(port) as 'Port' from Transaction where appName like '%abcd%

#2

Hi, @sakthi.p.ponraj: Try this:

SELECT count(*) 
FROM Transaction 
WHERE appName 
LIKE '%abcd%' 
FACET request.headers.host, port

#3

i tried that option, Getting table with no. Of transactions, Is it possible to hide that transaction column?


#4

No, I don’t think it is possible.


#5

The best solution may be to use separate queries, one for hosts and another for ports, and add the two tables to a single dashboard:


#6

Ok, As per the Screenshot you have the hostname with port no, Even that too also fine for me. can you please share the query for that.


#7

I just separated your original query into two:

SELECT uniques(request.headers.host) AS 'Host'
FROM Transaction 
WHERE appName LIKE '%abcd%'

and

SELECT uniques(port) AS 'Port'
FROM Transaction 
WHERE appName LIKE '%abcd%'