If big data sets have to be read from a database, it is recommended not to read all records at once. Instead do the following steps:

  1. Get an SQL handle using the getHandle operation from the SQL adapter.
  2. Iterate over the database records by using fetchNext until no more records are returned.
  3. If you don not iterate to the end of the result set, close the handle (operation closeHandle) to free resources. If the end of the handle is reached, the handle is closed automatically by the xUML Runtime.

In this case, the SQL output cannot be checked against the type since the output record is not known yet in the getHandle operation but only at fetchNext.

The example below shows an activity executing these steps.

The iteration over the SQL handle using fetchNext has to be implemented by the developer in an activity diagram. For more information refer to Implementing a Loop.

On this Page:

SQLAdapter_CustomerData_Example

Click the icon to download a simple example model that shows the usage of the SQL adapter in Scheer PAS Designer.

  • No labels