Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-2634

PQL & Hashes: Provide hash projection capability for facts & resource params

    XMLWordPrintable

Details

    • Hide

      json projection for the following endpoints/parameters with AST and PQL support.

      In scope, format <endpoint> - (<parameter>, ....)

      inventory - (facts, trusted)
      resources - (parameters)

      Out of scope, format <endpoint> - (<parameter>, ....)

      factsets - (facts)

      Show
      json projection for the following endpoints/parameters with AST and PQL support. In scope, format <endpoint> - (<parameter>, ....) inventory - ( facts , trusted ) resources - ( parameters ) Out of scope, format <endpoint> - (<parameter>, ....) factsets - ( facts)
    • PuppetDB
    • 5
    • Major
    • 3 - 25-50% of Customers
    • 3 - Serious
    • 5 - $$$$$$
    • Hide
      Improvements to make PQL easier to user/more easily understood would be a very good thing given it's the primary way to query data from the system as well to select nodes to run tasks against. This use case is likely the most common one for extracting node data.

      PQL is central to using Puppet/PE and usability improvements should be prioritized.

      Without this consultants and customers are forced to do a lot of post-processing of the full dataset to pick out the handful of fields they want as seen in Reid's example below. Common scenarios that are impacted like this are integrations with CMDBs and ticketing systems(e.g. Remedy) where customers want data grabbed regularly.
      Show
      Improvements to make PQL easier to user/more easily understood would be a very good thing given it's the primary way to query data from the system as well to select nodes to run tasks against. This use case is likely the most common one for extracting node data. PQL is central to using Puppet/PE and usability improvements should be prioritized. Without this consultants and customers are forced to do a lot of post-processing of the full dataset to pick out the handful of fields they want as seen in Reid's example below. Common scenarios that are impacted like this are integrations with CMDBs and ticketing systems(e.g. Remedy) where customers want data grabbed regularly.
    • New Feature
    • Hide
      The inventory and resource endpoints now support using dot notation for projections. This will allow you to pick specific a specific fact or resource parameter to return instead of the entire json for facts or parameters. You can find examples of using dot notation in [PQL](./api/query/examples-pql.markdown) and [AST](./api/query/v4/ast.markdown)

      Known issue - PDB-4521
      Show
      The inventory and resource endpoints now support using dot notation for projections. This will allow you to pick specific a specific fact or resource parameter to return instead of the entire json for facts or parameters. You can find examples of using dot notation in [PQL](./api/query/examples-pql.markdown) and [AST](./api/query/v4/ast.markdown) Known issue - PDB-4521

    Description

      Alongside PDB-2632, we should provide a mechanism for projection leaf values inside a hash, for example on the new `inventory` and existing `resources` endpoint we have facts, trusted and parameters. The proposal is to use the dotted notation to express this projection in PQL (and some adequate way in AST also).

      The deliverable here is that this kind of thing should work:

      inventory[facts.uptime]{ facts.operatingsystem = "foo" }
      

      inventory[certname, facts.sshrsakey, facts.sshecdsakey] {
        facts.os.family = "RedHat" and
        facts.os.release.major = "7"
      }
      

      Attachments

        Issue Links

          Activity

            People

              austin.blatt Austin Blatt
              ken Ken Barber
              Votes:
              12 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support