Generic - Object relationship SQL extractor
This topic describes how to configure and use object relationship SQL extractor, that allows to describe custom relationships among entities in TrueSight Capacity Optimization.
Integration steps
To integrate TrueSight Capacity Optimization with the Object relationship SQL extractor, perform the following task:
- Navigate to Administration > ETL & SYSTEM TASKS > ETL tasks.
- In the ETL tasks page, click Add > Add ETL under the Last run tab.
In the Add ETL page, set values for the following properties under each expandable tab.
Basic properties
Advanced properties
- Click Save.
You return to the Last run tab under the ETL tasks page. - Validate the results in simulation mode: In the ETL tasks table under ETL tasks > Last run, locate your ETL (ETL task name), click
to run the ETL.
After you run the ETL, the Last exit column in the ETL tasks table will display one of the following values:- OK: The ETL executed without any error in simulation mode.
- WARNING: The ETL execution returned some warnings in simulation mode. Check the ETL log.
- ERROR: The ETL execution returned errors and was unsuccessful. Edit the active Run configuration and try again.
- Switch the ETL to production mode: To do this, perform the following task:
- In the ETL tasks table under ETL tasks > Last run, click the ETL under the Name column.
- In the Run configurations table in the ETL details page, click
to edit the active run configuration.
- In the Edit run configuration page, navigate to the Run configuration expandable tab and set Execute in simulation mode to No.
- Click Save.
- Locate the ETL in the ETL tasks table and click
to Run it, or schedule an ETL run.
After you run the ETL, or schedule the ETL for a run, it will extract the data form the source and transfer it to the TrueSight Capacity Optimization database.
Configuring the SQL query
The Entities query must list all entities involved in the CMDB transaction:
The Relationships query must provide all parent/child relationships among entities:
Examples
Sample SQL query for Entities and Relationships (without lookup fields)
Suppose we have two tables, one containing the entity details and other contains the relationships between those entities.
ENTITY_NAME VARCHAR2(50) NOT NULL,
DS_ENTITY_NAME VARCHAR2(100) NOT NULL,
ENTITY_CATEGORY VARCHAR2(20) NOT NULL,
ENTITY_TYPE VARCHAR2(20) NOT NULL
);
DS_ENTNM, ENTITY_CATEGORY as ENTCATNM, ENTITY_TYPE as ENTTYPENM from ENTITIES
ENTITY_NAME VARCHAR2(50) NOT NULL,
DS_ENTITY_NAME VARCHAR2(100) NOT NULL,
ENTITY_CATEGORY VARCHAR2(50) NOT NULL,
PARENT_DS_ENTITY_NAME VARCHAR2(100) NOT NULL,
PARENT_ENTITY_CATEGORY VARCHAR2(20) NOT NULL
);
as ENTCATNM, PARENT_DS_ENTITY_NAME as DS_ENTNMPARENT, PARENT_ENTITY_CATEGORY as ENTCATNMPARENT from RELATIONSHIPS
This will create hierarchy as follows:
The entities lookup will be as follows:
Sample SQL query for Entities and Relationships (with lookup fields)
Suppose we have two tables, one containing the entity details and other contains the relationships between those entities.
ENTITY_NAME VARCHAR2(50) NOT NULL,
DS_ENTITY_NAME VARCHAR2(100) NOT NULL,
ENTITY_CATEGORY VARCHAR2(20) NOT NULL,
ENTITY_TYPE VARCHAR2(20) NOT NULL,
STRONGLOOKUPFIELDS VARCHAR2(100) NOT NULL
);
ENTITY_CATEGORY as ENTCATNM, ENTITY_TYPE as ENTTYPENM, STRONGLOOKUPFIELDS from ENTITIES
ENTITY_NAME VARCHAR2(50) NOT NULL,
DS_ENTITY_NAME VARCHAR2(100) NOT NULL,
ENTITY_CATEGORY VARCHAR2(50) NOT NULL,
PARENT_DS_ENTITY_NAME VARCHAR2(100) NOT NULL,
PARENT_ENTITY_CATEGORY VARCHAR2(20) NOT NULL,
STRONGLOOKUPFIELDS VARCHAR2(100) NOT NULL
);
ENTITY_CATEGORY as ENTCATNM, PARENT_DS_ENTITY_NAME as DS_ENTNMPARENT, PARENT_ENTITY_CATEGORY as ENTCATNMPARENT from RELATIONSHIPS
This will create hierarchy as follows:
The entities lookup will be as follows: