Database Query

We are having issues with querying data from a view in one of our datasources.  When attempting to run the queryEntity, we get the following error.

"Expression evaluation error at function a!queryEntity [line 20]: An error occurred while retrieving the data."

The server log indicates a timeout occurred, however if I run a process model with the Query Database node and a SQL statement, the node returns the correct values in considerably less time than our timeout settings.

Thoughts?

 

Bryant

+++++++++++++++ Code Snippets ++++++++++++++++++

 

Query Entity:

a!queryEntity(
  entity: cons!SMTS_EV_PROJECT_SUMMARY_DSE,
  query: a!query(
    selection: a!querySelection(
      columns: a!queryColumn(
        field: "subprojectId"
      )
    ),
    filter: a!queryFilter(
      field: "subprojectId",
      operator: "=",
      value: 30509
    ),
    pagingInfo: a!pagingInfo(1,1)
  )
)

 

SQL Statement:

select subprojectId, bac from evm.ProjectCurrentBaselineSummary where subprojectId = 30509

 

  Discussion posts and replies are publicly visible

Parents
  • This doesn't seems to be a performance related issue as the query entity is just querying a single column and has only one filter as subprojectId,this might be because the database might be down or some heavy load operations might be going on the tables which are used to render the view,however if this issue still persists and the view tables used in the view has huge datasets we can opt to create a stored procedure whihc accepts "subprojectId" as one of the parmaters and the stored procedure will include just a single sql statement and return this data back to appaina in the form of JSON and then on the appian side you can use the data returned by stored procedure in the way you want.
Reply
  • This doesn't seems to be a performance related issue as the query entity is just querying a single column and has only one filter as subprojectId,this might be because the database might be down or some heavy load operations might be going on the tables which are used to render the view,however if this issue still persists and the view tables used in the view has huge datasets we can opt to create a stored procedure whihc accepts "subprojectId" as one of the parmaters and the stored procedure will include just a single sql statement and return this data back to appaina in the form of JSON and then on the appian side you can use the data returned by stored procedure in the way you want.
Children