Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.
Version: 10.3

Stored Procedure Configuration

The ServiceNow Adapter uses the following configuration files to determine which stored procedures are executed during data processing and data transmission operations:

  • procedures.dimension.yaml - defines the stored procedures that populate dimension tables
  • procedures.fact.yaml - defines the stored procedures that populate fact tables
warning

Do not modify procedures.dimension.yaml or procedures.fact.yaml.

Adapter upgrades may replace these files and overwrite your changes. To customize stored procedure definitions, learn more about Stored Procedure Configuration Override

Each procedure definition in the configuration can include the following properties:

PropertyDescription
nameThe unique identifier of the stored procedure.
orderThis defines the execution order where lower values run first.
execRuleThis defines the execution behavior (Always or Conditional).

Note: Always procedures run regardless of the enabled value, while Conditional procedures run only when the enabled value is true.
dataSourceThis specifies the source or staging table used by the procedure.
cacheTableThis specifies the cache table created for the PushData job.
endpointThis specifies the ServiceNow API endpoint used by the PushData job.
tableTypeThis indicates whether the procedure handles fact or dimension data.

Note: dimension tables or stored procedures are designed to run before fact tables to ensure necessary information exist for later processing.
openiTSourceThis specifies the source data type used.

Note: This is typically used by fact tables and may be blank for dimension tables.
enabledThis indicates whether the procedure is enabled (true or false).
minAppVersionThis specifies the minimum supported version of the LicenseAnalyzer installed in the ServiceNow instance.
scopeThis specifies the application scope in ServiceNow where the endpoint is located.
Procedure Properties

Stored Procedure Configuration Override

The ServiceNow Adapter supports override configuration files that allow administrators to customize stored procedure definitions without modifying the default configuration files.

The override file allows you to:

  • Modify existing procedure definitions
  • Enable or disable procedures
  • Change procedure execution order
  • Add new procedures for custom integrations

To customize the default procedure definitions, create a file named procedures.override.yaml in the ServiceNow Adapter's Configuration directory, which is C:\Program Files\OpeniT\ServiceNow Adapter\Configuration by default.

tip

Override files are used to store custom or environment-specific configuration changes separately from the default configuration. This approach helps preserve the original settings, simplifies upgrades, and ensures that custom modifications are not accidentally overwritten.

warning

YAML files are sensitive to indentation and formatting. When creating or editing procedures.override.yaml:

  • Use spaces for indentation.
  • Do not use tab characters.
  • Ensure properties are properly aligned under each procedure entry.
  • Incorrect indentation or alignment may cause the adapter to fail to load the override configuration.

How the Override File Works

The ServiceNow Adapter identifies stored procedures using the name property.

When a procedure in procedures.override.yaml has the same name as an existing procedure in the base configuration, the adapter updates only the specified properties and keeps the remaining values from the original definition.

For example, the base configuration may contain the following procedure:

Sample base configuration
procedures:
- name: SN_INSERT_eng_app_usage
order: 2
execRule: Conditional
dataSource: SN_eng_app_usage
cacheTable: SN_cache_eng_app_usage
endpoint: eng_app_usage
tableType: fact
openiTSource: "[999]"
minAppVersion: 1.3
enabled: true
scope: sample_app_scope

To change only the execution order of the SN_INSERT_eng_app_usage procedure, add the following entry to procedures.override.yaml:

procedures.override.yaml
procedures:
- name: SN_INSERT_eng_app_usage
order: 10

The override configuration above updates the order property from 2 to 10 while retaining all other properties from the original definition.

warning

Changing the execution order of dimension procedures is not recommended because subsequent procedures may depend on the data they generate.

Another example, if you want to prevent an existing procedure from running, set enabled to false.

procedures.override.yaml
procedures:
- name: SN_INSERT_eng_app_usage
enabled: false

In this example, the procedure remains defined in the base configuration but is excluded from execution.

tip

When overriding an existing procedure, specify only the properties that need to be changed. All unspecified properties continue to use their values from the base configuration.

Adding a New Procedure

New procedures may be added through the override file.

Unlike updates to existing procedures, new procedures must include all required properties:

  • name
  • order
  • execRule
  • dataSource
  • cacheTable
  • endpoint
  • tableType
  • openiTSource
  • minAppVersion
  • enabled
  • scope
note

The minAppVersion property is required. For custom procedures that are not tied to LicenseAnalyzer, use 1.0 as the default value.

Example

procedures.override.yaml
procedures:
- name: SN_INSERT_custom_usage
order: 100
execRule: Conditional
dataSource: SN_custom_usage
cacheTable: SN_cache_custom_usage
endpoint: custom_usage
tableType: fact
openiTSource: "[999]"
minAppVersion: 1.0
enabled: true
scope: sample_app_scope