ACD201 practice question 3 of 15

You run a report on different employee transactions by using a View. You encounter the following error: "a!queryEntity: An error occurred while retrieving the data." What is the most likely root cause of this error?

Full set: 99 questions
Answer options
A: The view doesn't have a column mapped as a primary key in its corresponding CDT. Correct answer
B: The view contains a large number of rows, requiring more time to fetch the data.
C: The rule contains a missing syntax.
Correct Answer:
A. The view doesn't have a column mapped as a primary key in its corresponding CDT.
Explanation

The a!queryEntity function requires a data store entity to have a designated primary key to uniquely identify and retrieve each row of data. While database tables usually have a primary key defined, database views do not. Therefore, when mapping a view to a Custom Data Type (CDT) to be used as a data store entity, you must manually designate one of the CDT fields as the primary key using the @Id JPA annotation. Failure to do so prevents Appian from processing the view's data, resulting in the "An error occurred while retrieving the data" error.

Why Incorrect

B. The view contains a large number of rows, requiring more time to fetch the data. This would typically cause a performance-related timeout error, not a generic data retrieval failure. The error message does not indicate a timeout.
C. The rule contains a missing syntax. A syntax error in an expression rule is usually caught by the design-time editor and would prevent the rule from being saved or, if executed, would produce a specific syntax-related error message, not a data retrieval error.

References

1. Appian Documentation, Data Store, "Create a Data Store Entity from a Database Table or View": "For database views, you must select a column to use as the primary key. Appian does not support views that do not have a primary key. If your view does not have a column that is always unique, we recommend adding a column that can act as a primary key, such as by using the ROWNUM pseudo column in Oracle." This source confirms the mandatory requirement of a primary key for a view-based entity.

2. Appian Documentation, Custom Data Type (CDT) Design, "JPA Annotations": The @Id annotation is listed for specifying the primary key field for an entity. This is the specific mechanism used within the CDT's XSD file to map a field to a primary key, which is essential for view-based entities.

Scroll to Top