Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

4. Data Transformation > Transformation results

Transformation results

Now, that we've written all transformation rules, the data from the legacy system is in good shape for our model—we can start with populating it. To extract data from the knowledge session, we'll use Drools queries.

Tip

Query

Drools query looks like a normal rule without the then part. It can be executed directly from a stateful knowledge session for example, session.getQueryResults("getAllCustomers") or by using QueryCommand. It returns a QueryResults object that can contain multiple QueryResultsRow objects. Every QueryResultsRow instance represents one match of the query. Individual objects/facts can be retrieved from QueryResultsRow. Drools queries are a convenient way of retrieving objects/facts from the knowledge session that match conditions specified by the query. Queries can be parameterized. In a KnowledgeBase, all of the queries share the same namespace.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial