Sequential

Sequential

Runs multiple generators one after another and optionally chains interim results. This allows chaining of generators which optionally can alter previously generated values instead of running a sub-generator (e.g., FormatDateAsNumber, FormatNumberAsDate, Padding or PrePostfix).

Attributes
Name Description Required Min Max Allowed Values
delimiter Content type: String
Delimiter to insert between concatenations, e.g., values: {"foo","bar"} and delimiter "##" Result: "foo##bar". Requires concatenateResults to be enabled.
Default: <not set> (do not use any delimiter)
no 0 1
delimitEmptyValues Content type: Boolean
Add the delimiter even if the value to be concatenated is null or empty.
Requires the option concatenateResults to be enabled.Default: true
no 0 1
  • true
  • false
  • 0
  • 1
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
concatenateResults Content type: Boolean
Concatenate all sub-generator values as string. To add pre- and post-fixes the PrePostfix generator can be used.
Default: false
no 0 1
  • true
  • false
  • 0
  • 1
Nodes
Name Description Required Min Max Allowed Values
gen Value Generator for this field yes 1

Examples

  1. Padded Number with Leading Zeros

    Generates a random integer and pads it with leading zeros to four digits.

    Schema config for Padded Number with Leading Zeros
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--
    /*******************************************************************************
    * Copyright (c) 2013, bankmark and/or its affiliates. All rights reserved.
    * bankmark UG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    ******************************************************************************/
    --><schema xmlns:doc="http://bankmark.de/pdgf/doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="demo" xsi:noNamespaceSchemaLocation="structure/pdgfSchema.xsd">
      <!-- All data is derived from this starting seed.
           If this seed is the same, the generated data will the same on each
           computer/node/platform.
           Change this seed to generate a different data set.-->
      <seed>1234567890L</seed>
    
      <rng name="PdgfDefaultRandom"/>
    
      <!--Default Scale factor for all tables -->
      <property name="SF" type="double">1</property>
    
      <table name="SEQUENTIALS">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Padded Number with Leading Zeros-->
          <!--Generates a random integer and pads it with leading zeros to four digits.-->
          <field name="id_with_leading_zeros" size="" type="VARCHAR">
            <gen_Sequential>
              <!-- random long -->
              <gen_LongNumber>
                <min>1</min>
                <max>10</max>
              </gen_LongNumber>
    
              <!-- pad with zeros if previous generated number < 1000 -->
              <gen_Padding>
                <character>0</character>
                <size>4</size>
                <padToLeft>true</padToLeft>
              </gen_Padding>
            </gen_Sequential>
          </field>
          </table>
    </schema>
    
    Output for Padded Number with Leading Zeros
    0009
    0001
    0006
    0004
    0010
    0009
    0009
    0004
    0002
    0002
  2. Padded Number with Common Prefix

    Generates a random integer, pads it with zeros to four digits, and adds a common prefix 'CUSTOMER#'.

    Schema config for Padded Number with Common Prefix
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--
    /*******************************************************************************
    * Copyright (c) 2013, bankmark and/or its affiliates. All rights reserved.
    * bankmark UG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    ******************************************************************************/
    --><schema xmlns:doc="http://bankmark.de/pdgf/doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="demo" xsi:noNamespaceSchemaLocation="structure/pdgfSchema.xsd">
      <!-- All data is derived from this starting seed.
           If this seed is the same, the generated data will the same on each
           computer/node/platform.
           Change this seed to generate a different data set.-->
      <seed>1234567890L</seed>
    
      <rng name="PdgfDefaultRandom"/>
    
      <!--Default Scale factor for all tables -->
      <property name="SF" type="double">1</property>
    
      <table name="SEQUENTIALS">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Padded Number with Common Prefix-->
          <!--
            Generates a random integer, pads it with zeros to four digits, and adds a common prefix 'CUSTOMER#'.
          -->
          <field name="id_with_common_prefix" size="" type="VARCHAR">
            <gen_Sequential>
              <!-- random long -->
              <gen_LongNumber>
                <min>1</min>
                <max>10</max>
              </gen_LongNumber>
    
              <!-- pad with zeros if previous generated number < 1000 -->
              <gen_Padding>
                <character>0</character>
                <size>4</size>
                <padToLeft>true</padToLeft>
              </gen_Padding>
    
              <!-- add CUSTOMER# prefix -->
              <gen_PrePostfix>
                <prefix>CUSTOMER#</prefix>
              </gen_PrePostfix>
            </gen_Sequential>
          </field>
          </table>
    </schema>
    
    Output for Padded Number with Common Prefix
    CUSTOMER#0010
    CUSTOMER#0001
    CUSTOMER#0001
    CUSTOMER#0001
    CUSTOMER#0009
    CUSTOMER#0010
    CUSTOMER#0006
    CUSTOMER#0007
    CUSTOMER#0008
    CUSTOMER#0003
  3. Naive Decimal Number

    Generates a decimal number by concatenating two random integers delimited with a dot (.).

    Schema config for Naive Decimal Number
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--
    /*******************************************************************************
    * Copyright (c) 2013, bankmark and/or its affiliates. All rights reserved.
    * bankmark UG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    ******************************************************************************/
    --><schema xmlns:doc="http://bankmark.de/pdgf/doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="demo" xsi:noNamespaceSchemaLocation="structure/pdgfSchema.xsd">
      <!-- All data is derived from this starting seed.
           If this seed is the same, the generated data will the same on each
           computer/node/platform.
           Change this seed to generate a different data set.-->
      <seed>1234567890L</seed>
    
      <rng name="PdgfDefaultRandom"/>
    
      <!--Default Scale factor for all tables -->
      <property name="SF" type="double">1</property>
    
      <table name="SEQUENTIALS">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Naive Decimal Number-->
          <!--Generates a decimal number by concatenating two random integers delimited with a dot (.).-->
          <field name="decimal_number" size="" type="NUMERIC">
            <gen_Sequential concatenateResults="true" delimiter=".">
              <!-- integer part -->
              <gen_LongNumber>
                <min>0</min>
                <max>1</max>
              </gen_LongNumber>
    
              <!-- decimal part -->
              <gen_LongNumber>
                <min>0</min>
                <max>9</max>
              </gen_LongNumber>
            </gen_Sequential>
          </field>
          </table>
    </schema>
    
    Output for Naive Decimal Number
    1.3
    1.5
    1.3
    0.6
    0.2
    0.8
    1.0
    0.7
    0.0
    1.0
  4. Person with Email Address

    Generates email addresses based on the given first and last name of a person.

    Schema config for Person with Email Address
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--
    /*******************************************************************************
    * Copyright (c) 2013, bankmark and/or its affiliates. All rights reserved.
    * bankmark UG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    ******************************************************************************/
    --><schema xmlns:doc="http://bankmark.de/pdgf/doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="demo" xsi:noNamespaceSchemaLocation="structure/pdgfSchema.xsd">
      <!-- All data is derived from this starting seed.
           If this seed is the same, the generated data will the same on each
           computer/node/platform.
           Change this seed to generate a different data set.-->
      <seed>1234567890L</seed>
    
      <rng name="PdgfDefaultRandom"/>
    
      <!--Default Scale factor for all tables -->
      <property name="SF" type="double">1</property>
    
      <table name="SEQUENTIALS">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Person with Email Address-->
          <!--Generates email addresses based on the given first and last name of a person.-->
          <field name="first_name" type="VARCHAR">
            <gen_DictList id="first_name_gen">
              <file>dicts/Given-Names.dict</file>
            </gen_DictList>
          </field>
          <field name="last_name" type="VARCHAR">
            <gen_DictList id="last_name_gen">
              <file>dicts/Family-Names.dict</file>
            </gen_DictList>
          </field>
          <field name="company_email" size="" type="VARCHAR">
            <gen_Sequential concatenateResults="true">
              <gen_OtherFieldValue>
                <reference field="first_name"/>
              </gen_OtherFieldValue>
    
              <gen_StaticValue>
                <value>.</value>
              </gen_StaticValue>
    
              <gen_OtherFieldValue>
                <reference field="last_name"/>
              </gen_OtherFieldValue>
    
              <gen_StaticValue>
                <value>@company.com</value>
              </gen_StaticValue>
            </gen_Sequential>
          </field>
          </table>
    </schema>
    
    Output for Person with Email Address
    Annie|Pai|Annie.Pai@company.com
    Helma|Pietrzak|Helma.Pietrzak@company.com
    Ruthe|Gregory|Ruthe.Gregory@company.com
    Krystn|Konno|Krystn.Konno@company.com
    Ilyse|Xavier|Ilyse.Xavier@company.com
    Ermina|Najafi|Ermina.Najafi@company.com
    Jayendra|VMXA|Jayendra.VMXA@company.com
    Cuong|Zumhagen|Cuong.Zumhagen@company.com
    Bev|Bates|Bev.Bates@company.com
    Jacquelynn|Crompton|Jacquelynn.Crompton@company.com
2.7-83fb0 | 2020-04-22