skip to main content
Corticon Server: Data Integration Guide : Getting Started with ADC : Define and import queries for ADC
 

Try Corticon Now

Define and import queries for ADC

Queries are essential to how ADC functions. With just a few queries, a lot of the SQL tasks are minimized as the rules processing handles complex conditions and actions.
Running the sample's adc script created five tables that will be referenced by the query service. ADC_READ and ADC_WRITE access their DEF table to do the steps requested by your Ruleflow Service Call-outs.
Note: The BATCH_READ table inserts the queries you will use in Getting Started with Batch. For more about the sample's Corticon's queries, see How Corticon is expressed in SQL.

Define the Query Datasource connection

To connect a Vocabulary to a defined database where you will read the SQL queries, define the connection as a Query Datasource. In the project's Vocabulary editor, select the Vocabulary command Add Datasource > Add Query Datasource, as shown:
The Query tab is added to the root level of the Vocabulary as a fixed-name tab, as illustrated:
where:
*Description: An informative description of the Query Datasource.
*Database Server: The database product. Click the dropdown menu on the right side of the entry area to list the available database brands. Corticon embeds Progress DataDirect JDBC Drivers for each database. These drivers provide robust, configurable, high-availability functionality to RDBMS brands. The drivers are pre-configured and do not require performance tuning.
*Database URL: The preconfigured URL for the selected database server. You must edit the default entry to replace (1) <server> with the machine's DNS-resolvable hostname or IP address and port , and (2) <database name> with the database name that was set up (typically case-sensitive).
*Use Kerberos Authentication: When selected, indicates that the user will use the Kerberos authentication protocol. The Username and Password are greyed as they are not relevant for the Kerberos protocol:
*Username: The user credentials that enable connection to the database. The credentials are encrypted when the database access file is exported for deployment.
*Password: The specified user's password.
*Catalog Filter and Schema Filter: Patterns that refine the metadata that will be imported.
Click the CONNECTION Test button. Confirm that you have a valid connection before proceeding.

Import the queries

To access the queries for use in Decision Services, click the QUERIES Import button:
The current query names in the Query Datasource are accessed and brought into the local persistent cache. Whenever query names are revised, you need to re-import the queries. If the query defs referenced by a query name change, the latest defs will be accessed by the query name. .