How to Split Configuration Files Using XML Include

Valid for version 10.4.0+.

It is possible to use separate files for defining components of .runtimeConfig and .serverConfig files.

Procedure

  1. Create a separate file with the component definition.

  2. Refer to this new file in your runtime/server configuration file:

    1. Declare that you will use a reference to this additional file within the runtime/server configuration file. Add the following right after the XML declaration:

      runtimeConfig or serverConfig
      <!DOCTYPE doctype [
      <!ENTITY entity_name_1 SYSTEM "path_to_file_1">
      <!ENTITY entity_name_2 SYSTEM "path_to_file_2">
      ]>
      
      1. doctype: use runtimeconfig when editing .runtimeConfig and server when editing .serverConfig 
      2. entity_name: set a name for the reference
      3. path_to_file: an absolute path to the file with the component definition.
    2. Replace the component definition in the configuration file with the reference to it, using the entity_name defined in the previous step:

      &entity1_name;
  3. Start the server.

Example

This example shows how to prepare a data source definition in a separate file instead of .runtimeConfig.

Original runtime configuration file:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE runtimeconfig [
<!ENTITY dataSource SYSTEM "C:\Ataccama\DQC\11.3.0\workspace\Workflow Tutorials\etc\dataSources.xml">
]>
<runtimeconfig>
	<contributedConfigs/>
	<pathVariables/>
	<dataSources>
	<dataSource driverclass="org.apache.derby.jdbc.ClientDriver" name="wfl" user="wfl" password="crypted:DES:uj3hAwlJSWwwD1Jp62KwJRz8lUK36qMUto5HhuV6Izg="
    			url="jdbc:derby://localhost:1529/wfl;create=true"/>
	</dataSources>
	<parallelismLevel>1</parallelismLevel>
	<resources/>
</runtimeconfig>

Procedure:

  1. Create a separate file with the data source definition:

    dataSources.xml
    <dataSources>
    	<dataSource driverclass="org.apache.derby.jdbc.ClientDriver" name="wfl" user="wfl" password="crypted:DES:uj3hAwlJSWwwD1Jp62KwJRz8lUK36qMUto5HhuV6Izg="
        			url="jdbc:derby://localhost:1529/wfl;create=true"/>
    </datasSources>
  2. Refer to the dataSources.xml in your runtime configuration file:

    1. Declare that you will use a reference to dataSources.xml within the runtime configuration file. The reference is name dataSource.

      .runtimeConfig
      <!DOCTYPE runtimeconfig [
      <!ENTITY dataSource SYSTEM "C:\Ataccama\DQC\11.3.0\workspace\Workflow Tutorials\etc\dataSources.xml">
      ]>
      
    2. Replace the data source definition with the reference to it:

      .runtimeConfig
      &dataSource
  3. Start the server.

New runtime configuration file:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE runtimeconfig [
<!ENTITY dataSource SYSTEM "C:\Ataccama\DQC\11.3.0\workspace\Workflow Tutorials\etc\dataSources.xml">
]>
<runtimeconfig>
	<contributedConfigs/>
	<pathVariables/>
	&dataSource;
	<parallelismLevel>1</parallelismLevel>
	<resources/>
</runtimeconfig>