Jira (PDB-1441) support nested extracts

1 view
Skip to first unread message

Wyatt Alt (JIRA)

unread,
Apr 16, 2015, 6:00:48 PM4/16/15
to puppe...@googlegroups.com
Wyatt Alt created an issue
 
PuppetDB / New Feature PDB-1441
support nested extracts
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2015/04/16 3:00 PM
Priority: Normal Normal
Reporter: Wyatt Alt

if we had nested extracts, we could replicate the existing functionality of aggregate-event-counts by using the group-by operator with a query like this:

curl -X GET http://localhost:8080/v4/events -d 'query=["extract", [["function","count"],"status"], ["extract", [["function","count"],"status", "containing_class"], ["~","certname",".*], ["group_by", "status", "containing_class"]], ["group_by", "status"]]

which would translate into something like:
select status,count(1) from (select status,containing_class,count(1) from resource_events group by status,containing_class) ec group by status

this would be more or less equalivalent to an aggregate-event-counts call with summarize_by=containing_class.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)
Atlassian logo

Wyatt Alt (JIRA)

unread,
Jun 25, 2015, 8:30:11 PM6/25/15
to puppe...@googlegroups.com
Wyatt Alt updated an issue
Change By: Wyatt Alt
if we had nested extracts, we could replicate the existing functionality of aggregate-event-counts by using the group-by operator with a query like this:

curl -X GET http://localhost:8080/v4/events -d 'query=["extract", [["function","count"],"status"], ["extract", [["function","count"],"status", "containing_class"], ["~","certname",".*], ["group_by", "status", "containing_class"]], ["group_by", "status"]]

which would translate into something like:
 select status,count(1) from (select status,containing_class,count(1) from resource_events group by status,containing_class) ec group by status

this would be more or less  equalivalent  equivalent  to an aggregate-event-counts call with summarize_by=containing_class.

Claudia Petty (Jira)

unread,
Jun 21, 2023, 10:59:53 AM6/21/23
to puppe...@googlegroups.com
Claudia Petty updated an issue
Change By: Claudia Petty
Labels: new-feature
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages