[uCMDB] Define the delta sync condiftion for a general DB adapter.

Dear Experts,

I am populating windows nodes from SCCM, using the uCMDB SCCM adapter.

Unfortunatelly, a key attribute I pull is in a secondary table. Therefore, the delta sync does not pick up changes in the attribute.

How can I define the condition for newly modified nodes in the SCCM adapter, or more generaly in the generic DB adapter? The delta sync has to recognize the "modified" nodes and pull their data.

What is the default bahaviour? In other words, possibly a column in the primary table has to change for uCMDB to pick up a newer LastModifiedTime.

It would be something similar to the delta-sync-date-field in the AMAdapter.

uCMDB 10.22.CUP7.513

CP 29.00.103

Minimal orm.xml:


<?xml version="1.0" encoding="UTF-8"?>

<entity-mappings xmlns="">java.sun.com/.../orm"
        xmlns:xsi="">www.w3.org/.../XMLSchema-instance"
        version="1.0"
        xsi:schemaLocation="java.sun.com/.../orm ">java.sun.com/.../orm_1_0.xsd">
    <description>SCCM DB adapter ORM</description>
    <package>generic_db_adapter</package>
    <entity class="generic_db_adapter.node" >
        <table name="(Select primaryKey, etc, from primaryTable)"/>
        <secondary-table name=
                         "(Select
                        primaryKey,
                        attributeOne from secondaryTable SD
                        left outer join primaryTable PT
                        on SD.primaryKey = PT.primaryKey)"/>
        <discriminator-value>node</discriminator-value>
        <discriminator-column name="CI_TYPE"
                discriminator-type="STRING"/>
        <attributes>
            <id name="id1">
                <column updatable="false"
                        insertable="false"
                        name="ResourceID"/>
                <generated-value strategy="TABLE"/>
            </id>
            <basic name="ucmdb_attribute_name">
                <column updatable="false"
                        insertable="false"
                        name="custom_Model"
                        table=
                        "(Select
                        primaryKey,
                        attributeOne from secondaryTable SD
                        left outer join primaryTable PT
                        on SD.primaryKey = PT.primaryKey)"/>
            </basic>
        </attributes>
    </entity>
</entity-mappings>

Adapter Source:

<!-- ... etc -->

        <full-population-days-interval>7</full-population-days-interval>

<!-- ... etc -->

            <population-schedules>
                <data-acquisition-schedule>
                    <job-name>SCCM Population job</job-name>
                    <cron-type>1</cron-type>
                    <cron-expression-list>
                        <cron-expression>Days_1</cron-expression>
                    </cron-expression-list>
                    <start-time>2010-01-01T00:00:00.000</start-time>
                </data-acquisition-schedule>
            </population-schedules>

<!-- ... etc -->


Thank you for your help.

Tags: