20+ practice questions focused on Transform data with filters and plugins — one of the most tested topics on the Red Hat Certified Engineer EX294 exam. Each question includes a detailed explanation so you learn why the right answer is correct.
Start Transform data with filters and plugins PracticeWhich TWO filters are used to transform data types in Ansible?
Explanation: In Ansible, the `bool` and `int` filters are specifically designed to convert input values into boolean and integer data types, respectively. These are part of Ansible's Jinja2 filter set for explicit type coercion, enabling tasks to handle variables with the correct data type for conditional logic or arithmetic operations.
A DevOps engineer needs to extract the first 10 lines of a log file and store them in a variable for further processing. Which Ansible filter should be used?
Explanation: The `slice` filter in Ansible can be used to extract a portion of a list or string. When applied to a list of lines (obtained by splitting the file content), `slice(0,10)` returns the first 10 lines. While `head` also works on lists, it is not valid for strings when line extraction is needed, as it returns characters. The `slice` filter provides the necessary flexibility to specify a range, making it the most appropriate choice for this scenario.
An Ansible playbook needs to extract the first line from a multi-line string variable 'output' and store it in a new variable 'first_line'. Which filter should be used?
Explanation: The `split('\n')` filter splits the multi-line string into a list of lines, and the `first` filter extracts the first element. This is the standard Ansible approach to isolate the first line from a string variable.
A playbook uses the 'uri' module to query an API and registers the result. The API returns a JSON with a nested field 'data.users[0].name'. Which expression correctly extracts that name?
Explanation: Options B and D are both correct because the `json_query` filter accepts JMESPath queries quoted with either single or double quotes. Both `'data.users[0].name'` and `"data.users[0].name"` are syntactically valid in Ansible Jinja2 expressions. The `uri` module parses JSON response into a dictionary, so `result` is the top-level object, and the JMESPath query correctly extracts the nested field. Option C is incorrect because it uses native Jinja2 dot notation, which would only work if `result` were already a deeply nested dictionary, but the registered object may still contain headers and other HTTP metadata. Option A is incorrect because JMESPath uses zero-based index without the dot notation, i.e., `users[0]`, not `users.0`.
A team is migrating from static inventory to dynamic inventory using a custom script. The script returns JSON with a group 'webservers' containing hosts. However, the playbook targeting 'webservers' fails with 'no hosts matched'. Which filter or plugin issue is most likely?
Explanation: Dynamic inventory scripts must include a `_meta` key with `hostvars` in their JSON output for Ansible to properly resolve host variables and match hosts to groups. Without `_meta`, Ansible cannot associate host-specific variables (like `ansible_host`) with the hosts listed under `webservers`, causing the playbook to see no matched hosts even though the group exists.
+15 more Transform data with filters and plugins questions available
Practice all Transform data with filters and plugins questions1. Baseline your knowledge
Start with 10 questions to gauge your current understanding of Transform data with filters and plugins. This tells you whether you need a concept refresher or just practice.
2. Review every explanation
For each question — right or wrong — read the full explanation. Understanding why an answer is correct is more valuable than knowing the answer itself.
3. Focus on exam traps
Transform data with filters and plugins questions on the EX294 frequently use trap wording. Look for subtle differences in answers that test your precision, not just general knowledge.
4. Reach 80% consistently
Do repeated sessions until you score 80%+ three times in a row. Then move to mixed-mode practice to test cross-topic recall under realistic conditions.
The exact number varies per candidate. Transform data with filters and plugins is tested as part of the Red Hat Certified Engineer EX294 blueprint. Practicing with targeted Transform data with filters and plugins questions ensures you can handle any format or difficulty that appears.
Yes. Courseiva provides free EX294 practice questions across all exam topics and domains. The platform includes topic-based practice, mock exams, missed-question review, bookmarked questions, and readiness tracking — no account required.
Difficulty is subjective, but Transform data with filters and plugins is a high-priority exam concept tested in multiple ways — direct recall, scenario analysis, and command-output interpretation. Consistent practice is the best way to build confidence.
Launch a full Transform data with filters and plugins practice session with instant scoring and detailed explanations.
Start Transform data with filters and plugins Practice →