Skip to content

REF004: unknown-named-query

Named query does not exist

Code REF004
Name unknown-named-query
Category References (REF)
Default severity error
Enabled by default yes
Fix available no
ign-lint equivalent none

Checks the queryPath of every query binding (views and session properties) against the named queries the project sees, including inherited ones. Scripts are checked too: literal paths passed to system.db.runNamedQuery, runSFNamedQuery, clearNamedQueryCache, execQuery and execUpdate (through aliases and local names holding a literal). The project-scoped forms (runNamedQuery(project, path, ...), project= keywords) are checked against the named project when it is in the workspace (system.util.getProjectName() is the script's project). A call runNamedQuery(a, b) whose second argument is neither a string nor a dict is read as (path, parameters) only when a cannot be a project name (it contains /).

The binding fails at run time with an error quality and the component shows no data. A missing named query is usually one that was renamed or moved to another folder.

Paths with {...} placeholders and projects that inherit from a project outside the workspace are not reported.

{"type": "query", "config": {"queryPath": "Machines/ByLin"}}

Use instead:

{"type": "query", "config": {"queryPath": "Machines/ByLine"}}

Generated from the rule metadata by iglint generate-docs; iglint rule REF004 prints the same page in the terminal. Source: docs/rules/REF004.md.