Adapter descriptions for Instance Data Replication

  • Release version: Xanadu
  • Updated August 1, 2024
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Adapter Descriptions for Instance Data Replication

    The Instance Data Replication (IDR) feature allows ServiceNow customers to modify producer data before it is inserted into consumer instances. Different adapters serve specific purposes, enabling data transformation and ensuring accurate data representation across systems.

    Show full answer Show less

    Key Features

    • Calculation Adapter: Performs arithmetic operations on source data, such as multiplication or applying maximum and minimum limits.
    • Concatenate String Adapter: Appends a specified string to the source data for clarity or format consistency.
    • Fixed-width Format Adapter: Reformats fixed-width input data to a specific output format, useful for standardizing data presentation.
    • Map Adapter: Translates source-to-target values using exact matches, ensuring accurate data mapping.
    • Pattern Adapter: Identifies patterns in data using regular expressions, allowing for complex transformations based on input patterns.
    • Replace Adapter: Replaces specified strings within the data, with options for controlling the number of occurrences replaced.
    • Split Adapter: Divides a string into multiple components based on a specified delimiter, facilitating data organization.
    • Task Number Adapter: Modifies task numbers by adding or replacing prefixes and suffixes for better identification.
    • Time Zone Conversion Adapter: Converts time representations from one time zone to another, aiding users in scheduling and time-sensitive operations.

    Key Outcomes

    By utilizing these adapters, ServiceNow customers can ensure their data is accurately transformed and formatted for various use cases, enhancing data integrity and operational efficiency across their platforms. This functionality is essential for maintaining consistency, improving data usability, and facilitating seamless data integration between producer and consumer instances.

    Adapters modify the producer data before inserting the data on consumer instances in Instance Data Replication (IDR).

    Adapter fields

    Each adapter has Name and Description fields. The name appears in the Adapter column. Use the Description field to explain the purpose of the data conversion.

    Calculation adapter

    Use the calculation adapter on the producer data to specify the operation and the value that is used in the operation.
    Table 1. Parameter examples
    Parameter and value Source data Adapter output
    Operation: Multiply

    Constant Value: 1.08

    10 10.80
    Operation: Max

    Constant Value: 1000

    1020 1000
    Operation: Floor

    Constant Value: 0

    5.5 5
    Max specifies the highest and Min specifies the lowest possible values. Values above or below those limits are set to those limits. Value types such as int and long have maximum and minimum values. Values above or below those limits cause precision errors.

    Concatenate String adapter

    Use the concatenate string adapter to append a specified string to the source data.
    Table 2. Parameter example
    Parameter and value Source data Adapter output
    String: _v2 Patch10236 Patch10236_v2

    Fixed-width format adapter

    Use the fixed-width format adapter to reformat fixed-width input data. Use # to represent any positive integer, @ to represent any character, and \ as the literal escape character.
    Table 3. Parameter examples
    Parameter and value Source data Adapter output
    Match: ##########

    Output: (###) ###-####

    7605551212 (760) 555-1212
    Match: #####

    Output: ###.##

    10000 100.00
    Match: ##\,###

    Output: #####

    10,000 10000

    Map adapter

    Use the map adapter for comma-separated pairs of literals to map source-to-target conversions. Matches must be exact. For example, PRB=TASK would not convert PRB1000 to TASK1000.
    Table 4. Parameter examples
    Parameter and value Source data Adapter output
    Map: PRB=TASK, done=complete PRB TASK
    Map: PRB=TASK, done=complete done complete
    Map: PRB=TASK, done=complete PRB1000 (no mapping)

    Pattern adapter

    Use the pattern adapter for regular expressions to identify input patterns. Use parentheses in the Regex to identify groups. In Output Pattern, use $ to specify groups. $0 represents the entire input, $1 represents the first group, $2 represents the second group, and so on. You can also insert, prefix, and append literal characters, including spaces so they appear in the adapter output.
    Table 5. Parameter examples
    Parameter and value Source data Adapter output

    Regex: (.*),(.*)

    Output pattern: $2 $1

    Smith, John John Smith

    Regex: (ABC[a-zA-z][a-zA-z])(ABC[a-zA-z][a-zA-z])

    Output pattern: $1 $0

    ABCDEABCFG ABCDE ABCDEABCFG

    Regex: (ABC[a-zA-z][a-zA-z])(ABC[a-zA-z][a-zA-z])

    Output pattern: $1 release $0

    ABCDEABCFG ABCDE release ABCDEABCFG
    In the second example, the match is ABC followed by two letters, followed by ABC and two letters. $1 of this input is ABCDE. $2 of this input is ABCFG. $0 is the entire input string. So $1 $0 is ABCDE ABCDEABCFG.

    Replace adapter

    Use the replace adapter to replace a specified input string or substring with a specified string. Use $ to replace only some of the occurrences of the string. $1 replaces only the first occurrence; $2 replaces only the second. Use curly braces to replace the first N occurrences. For example, ${3} replaces the first three occurrences.
    Table 6. Parameter examples
    Parameter and value Source data Adapter output

    Find: London

    Replace: Madrid

    The product is London. The product is London. The product is London. The product is Madrid. The product is Madrid. The product is Madrid.

    Find: $2 London

    Replace: Madrid

    The product is London. The product is London. The product is London. The product is London. The product is Madrid. The product is London.

    Find: ${2} London

    Replace: Madrid

    The product is London. The product is London. The product is London. The product is Madrid. The product is Madrid. The product is London.

    Split adapter

    Use the split adapter to break a string into two or more strings using a specified delimiter made up of letters, numbers, or special characters (no spaces). In Output Pattern, use $ to specify groups. $0 represents the entire input, $1 represents the first group, $2 represents the second group, and so on. You can repeat a group in an output pattern, for example, $2, $1, $1. Multiple instances of a delimiter in source data create three or more groups.

    Table 7. Parameter examples
    Parameter and value Source data Adapter output

    Delimiter: -

    Output Pattern: $2, $1

    John-Smith Smith, John

    Delimiter: -

    Output Pattern: $2, $1, $1

    John-Harry-Smith Harry, John, John

    Delimiter: -

    Output Pattern: $3

    John-Harry-Smith Smith

    Task number adapter

    Use the task number adapter to add a prefix or suffix to a task number or replace the task number's prefix.
    Table 8. Parameter examples
    Parameter and value Source data Adapter output

    Modification: Replace

    Number Prefix: PRB

    New Number Prefix: STRY

    PRB80899 STRY80899

    Modification: Add Prefix

    Prefix: STRY

    08099 STRY80899

    Time zone conversion adapter

    Use the time zone conversion adapter to convert one time zone to another.

    Table 9. Parameter example
    Parameter and value Source data Adapter output
    Output time zone: PDT 07:00:00 am GMT 00:00:00 am PDT