Custom Objects

Within an Import, you can include an Object of Type="Custom". These custom objects are used to run SQL stored procedures, or raw SQL statements, against the central compliance database when customizations are needed. Using either method, the SQL statements are exercised within the same transaction as the data import. The choice between using a stored procedure or a direct SQL statement is set by the QueryType attribute:
QueryType="StoredProcedure"
or
QueryType="Text"
This example shows how to exercise a stored procedure as part of your import transaction:
<Object
   Name="ClearGroupExComments"
   Type="Custom"
   QueryType="StoredProcedure"
   Query="MyStoreProcedure">
</Object>
Custom objects are not automatically logged as part of the detailed tracing available in the database log (see Detailed Tracing). However, you can provide your own logging, using the one special keyword supported within the SQL:
Keyword Description
[LOG_IMPORT_ID]

Returns the current value of the ImportID column in the ECMImportLog_Summary table.

The following example shows writing a log entry into the ECMImportLog_Object table, providing a foreign key into the ECMImportLog_Summary table. For details about these tables, see Detailed Tracing.

<Object
   Name="ClearGroupExComments"
   Type="Custom"
   Query="Insert into ECMImportLog_Object([ImportID], [ObjectName], 
          [StartDate], [EndDate], [ObjectType], [Status]) 
          values ([LOG_IMPORT_ID], 'My Custom Object', 
          getdate(), getdate(),'Custom', 1)">
</Object>

2022 R1