Skip to main content
April 30, 2024
Question

Unable to retrieve my data from a View in Database into Appian RT/ ER

  • April 30, 2024
  • 13 replies
  • 0 views

Hi Experts,

Need your help in the following issue:

I have created one view that is getting data from a table in a DB.

Then I created the CDT for the same from that DB and then the DS is also verified and published with no error.

But on retrieving the data from a DB rom a query entity I am getting the following error:

 

Using the Record Type also I am getting the following error while viewing the Record list, We have only 194 records in that view: 

Please help me to identify the cause of the error. 

13 replies

stefanhelzle0001
April 30, 2024

Do you see any details in the tomcat stdout log file? For me, this looks like a timeout issue. DB views are known for this kind of issues.

April 30, 2024

Thanks [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] , I am attaching a stdout log file. Kindly help me to identify what is wrong. I am unable to find.[View:/cfs-file/__key/communityserver-discussions-components-files/62/TOMCAT-Log.txt:320:240]

stefanhelzle0001
April 30, 2024

In the first line, it just repeats the error message you already have.

My first guess is a timeout issue. And you can only solve that by speeding up that database view.

My second guess is a memory issue. The query returns too many rows with too many fields. Paging ist the solution.

harshk1671
April 30, 2024

Can you share the code of QE?

Also, did you check that your view has a column with unique identifier which you are using as a primary key?

April 30, 2024

Sure [mention:8e5a7a058e4f4768ba94c8d9526dd3e4:e9ed411860ed4f2ba0265705b8793d05] ,

Up on selecting the constant of the Entity, I am getting this error in Query Editor: 

Yes I created a Unique identifier column for my view which we are using as a PK. 

harshk1671
April 30, 2024

Can you share the output of following code:

a!queryEntity(
  entity: cons!Test_DSE_VW_MULT_TARGET,
  query: a!query(
    selection: a!querySelection(columns: { a!queryColumn(field: "vwid") }),
    pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1)
  ),
  fetchTotalCount: false()
)

csteward
April 30, 2024

One thing I always like to rule out when a DS is published successfully, but cannot access data, is that this is not an Oracle database with the view residing in a different schema than the home schema of the user account.  In this case, we need to create a synonym to the view, in the home schema of the database account.  This may not be the case, but for a while there has been a discrepancy with Oracle DBs and the different Java libraries that Appian uses for database validation, vs connection at runtime (Teneo vs Hibernate).  One can access objects in a different schema and one cannot.

However the memory and timeout error do not tend to this situation, typically we would see "table does not exist" or something of the sort.  Just to note.

davidj137213
April 30, 2024

How long does the query takes to execute and what's the size of the datasubset received? YOu can check it directly in the database......