Connection specifications document for the Database Toolkit
SPL standard and specialized toolkits > com.ibm.streams.db 2.0.0 > Connection specifications document for the Database Toolkit
A connection specifications document is an XML document that describes how operators in the Database Toolkit connect to and access specific external data services. Each document contains connection and access specification elements.
The connection and access specifications can be for a single operator, all the operators in an application, or organized by adapter type or any other criterion you choose. The only restriction is that the connection specification and the access specification for a particular operator declaration must be in the same connection specifications document.
The relationship between connection specifications and access specifications is many-to-many. Operators can connect to the same external data service (one connection specification) and access several different data resources from that service (many access specifications). Alternatively, operators can access equivalent data (one access specification) from several different external data services (many connection specifications). For example, you can access data from both a test system and a production system.
The connection and access specifications that are defined by the invocation parameters for the operator are set at SPL compile time. Any change in the reference document or parameter settings requires a recompile to take effect. After the application is compiled, the connections.xml document is not required for job submission.
When the SPL compiler encounters a Database Toolkit operator declaration, it must read the connection specifications document that is named by the connectionDocument parameter in the operator. The compiler checks that the document conforms to the semantic rules of the XML schema that is defined for these documents. The compiler uses the information that is given in the connection and access specifications to configure the operator. The compiler does not attempt to connect to the external data service or access its data to verify correct configuration at compile time. The operators have runtime checks to validate configuration. If the configuration is incorrect, these checks might result in runtime failures which are captured in the processing element logs. A valid connection specifications document consists of a <connections> root element which contains one <connection_specifications> element and one <access_specifications> element. These elements serve as containers for the connection specifications and access specifications. Here is an abridged example of a complete connection specifications document, with all <connection_specification> and <access_specification> elements omitted.
<?xml version="1.0" encoding="UTF-8"?>
<st:connections xmlns:st="http://www.ibm.com/xmlns/prod/streams/adapters"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<connection_specifications>
.
.
.
</connection_specifications>
<access_specifications>
.
.
.
</access_specifications>
</st:connections>