Use cases of stored procedure and views in Appian

Certified Senior Developer

Hello,

In which case will use views and stored procedures in Appian ?

I know the basics about it but I am not sure when will use stored procedure and views.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    There are very few applications that I have not used a stored procedure on. Stored procedures are a great way to offload some of the heavy lifting from Appian to the DB. Some common use cases are

    1. uploading a SQL/CSV file. Instead of putting all that data into memory, use the import to DB to get that data into a staging table, then use a stored proc to validate, manipulate, and split it into multiple tables and even write to a log file.
    2. heavy calculations that need to keep looping, pulling more data, etc.
    3. large data transformations or moves (even moving data to a history table)
    ... I could go on

    For views, again I always use them. Let the database transform the data before it gets pulled in. This way Appian is spending time on the execution and not then too much on transformation so that you do not hit timeouts or so that users are not waiting too long for a screen to render.

Reply
  • 0
    Certified Lead Developer

    There are very few applications that I have not used a stored procedure on. Stored procedures are a great way to offload some of the heavy lifting from Appian to the DB. Some common use cases are

    1. uploading a SQL/CSV file. Instead of putting all that data into memory, use the import to DB to get that data into a staging table, then use a stored proc to validate, manipulate, and split it into multiple tables and even write to a log file.
    2. heavy calculations that need to keep looping, pulling more data, etc.
    3. large data transformations or moves (even moving data to a history table)
    ... I could go on

    For views, again I always use them. Let the database transform the data before it gets pulled in. This way Appian is spending time on the execution and not then too much on transformation so that you do not hit timeouts or so that users are not waiting too long for a screen to render.

Children
No Data