StaticValue

StaticValue

For all rows the same value is used as specified in <value>The value string to be used</value>. Detects if static value is numerical. If so the value is usable for computation in other generators like Formula

Attributes
Name Description Required Min Max Allowed Values
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
Nodes
Name Description Required Min Max Allowed Values
value Content type: String
The static value to be used for all rows. <value></value> equals NULL. Values can be strings, numbers or property's. Detects if the value is numerical. If so the value is usable for computation in other generators like Formula
yes 1 1
Sub-Attributes
Parent Name Description Required Min Max Allowed Values
value string Treat value as String literal. Disable parsing/detection of formulas and number no 0 1
  • true
  • false
  • 0
  • 1

Examples

  1. Generate a static number

    Generates only the number 23.

    Schema config for Generate a static 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>
    
      <property name="EXCHANGE_RATE_EUR_TO_USD" type="double">1.3</property>
    
      <table name="Customer">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Generate a static number-->
          <!--Generates only the number 23.-->
          <field name="twenty-three_static_value" size="" type="NUMERIC">
            <gen_StaticValue>
              <value>23</value>
            </gen_StaticValue>
          </field>
          </table>
    </schema>
    
    Output for Generate a static number
    23
    23
    23
    23
    23
    23
    23
    23
    23
    23
  2. Generate NULL value

    Generates NULL/empty value.

    Schema config for Generate NULL value
    <?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>
    
      <property name="EXCHANGE_RATE_EUR_TO_USD" type="double">1.3</property>
    
      <table name="Customer">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Generate NULL value-->
          <!--Generates NULL/empty value.-->
          <field name="null_static_value" size="" type="NUMERIC">
            <gen_StaticValue>
              <value/>
            </gen_StaticValue>
          </field>
          </table>
    </schema>
    
    Output for Generate NULL value
    
    
    
    
    
    
    
    
    
          
  3. Static Value formula

    Generates only the number 23 and multiplies it with the give property.

    Schema config for Static Value formula
    <?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>
    
      <property name="EXCHANGE_RATE_EUR_TO_USD" type="double">1.3</property>
    
      <table name="Customer">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Static Value formula-->
          <!--Generates only the number 23 and multiplies it with the give property.-->
          <field name="twenty-three_static_value-times_prop" size="" type="NUMERIC">
            <gen_pdgf.generator.StaticValue>
              <value>23*${EXCHANGE_RATE_EUR_TO_USD}</value>
            </gen_pdgf.generator.StaticValue>
          </field>
          </table>
    </schema>
    
    Output for Static Value formula
    29.900000000000002
    29.900000000000002
    29.900000000000002
    29.900000000000002
    29.900000000000002
    29.900000000000002
    29.900000000000002
    29.900000000000002
    29.900000000000002
    29.900000000000002
2.7-83fb0 | 2020-04-22