Important This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Creating a user-defined database query format


TrueSight Network Automation allows you to define new data import formats based on SQL queries. The DeviceImportFormatMap.xml file contains the definitions of all the import formats that are supported by the system. By following this procedure, you can define new device import formats and have them appear on the UI and be used in the same manner of any of the predefined formats.

To create a user-defined database query format

  1. Copy the device import format definition XML file from:
    BCAN_HOME/public/bmc/bca-networks/xml/DeviceImportFormatMap.xml
     to
    BCAN_DATA/DeviceImportFormatMap.xml
  2. Open the DeviceImportFormatMap.xml file with an editor.
  3. Add a new section to the file similar to the following example (you must modify the values in bold):

    <importFormat>
           <id>1000</id>
           <name>My New Database Format</name>
           <shortName>My New DB</shortName>
           <source>jdbc</source>
           <transformerClassName>
               com.bmc.bcan.engine.database.imports.GenericJdbcTransformer
           </transformerClassName>
           <jdbcQuery>
               <query>
                 SELECT EntityName as name,
                     IPAddress as address,
                     EntityOID as deviceType,
                     Description as description
                 FROM mainNodeDetails
                 WHERE EntityOID IS NOT NULL;
               </query>
               <columns>
                 <column>name</column>
                 <column>address</column>
                 <column type="oid">deviceType</column>
                 <column type="dynamicField">description</column>
               </columns>
           </jdbcQuery>
    </importFormat>
    The following table lists each of the tags in the preceding XML snippet. Tags in which you need to modify the values are in bold:

    The [confluence_table-plus] macro is a standalone macro and it cannot be used inline. Click on this message for details.

  4. Save your modifications and restart the TrueSight Network Automation web server service.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*