| PuppetDB documents its use of "dotted field[s], which represents a path into a JSON tree" here. Notably, "Any path component can be double-quoted" in order to accommodate specification of path components which themselves contain dot characters. When writing PQL queries, however, such as the following, it is currently impossible to use this documented dotted field syntax.
inventory[certname, facts."my.fact.has.dots"] { LIMIT 1 }
|
The following error will be returned.
2021/10/25 05:37:14 ERROR - [GET /pdb/query/v4][400] getQueryBadRequest PQL parse error at line 1, column 27: |
|
inventory[certname, facts."my.fact.has.dots"] { } |
^ |
|
Expected one of: |
|
#"match\(.*?\)" |
#"[^\s\.\",\[\]!<=>~]+(\[\d+\])?" |
#"\".*?\"(?=\.|\s)"
|
Expected outcome The PQL given above should be equivalent to this AST query.
["from","inventory",["extract", ["certname", "facts.\"my.fact.has.dots\""]]]
|
|