Null

Null

Generates a NULL value with a configurable probability. If the generator decides against generating NULL, it runs the specified sub-generator to generate the final field value.

Attributes
Name Description Required Min Max Allowed Values
seed Random number generator seed of this Element. Overrides default seeding behavior. no 0 1
probability Content type: Double (between 0.0 and 1.0)
Sets the probability for generating a NULL value.
yes 1 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
Nodes
Name Description Required Min Max Allowed Values
sameChoiceAs Content type: Empty
Requires a <field> and a <generatorByID> attribute (in same table) to pick the row number from. If specified this Null does not choose a random row, but it uses the same row as the referenced generator.
no 0 1
gen Value Generator for this field no 0 1
  • pdgf.generator.MarkovChainText
  • pdgf.generator.AsReferenceChoice
  • pdgf.generator.WeightedListItem
  • pdgf.generator.DetailFromDate
  • pdgf.generator.BuildList
  • pdgf.generator.InsertIntoString
  • pdgf.generator.UUID
  • pdgf.generator.Probability
  • pdgf.generator.RandomString
  • pdgf.generator.Sequential
  • pdgf.generator.ConvertNumberToString
  • pdgf.generator.WeightedSubListItem
  • pdgf.generator.RandomListItems
  • pdgf.generator.Email
  • pdgf.generator.ActionDeleteIsAlsoUpdate
  • pdgf.generator.DoubleNumber
  • pdgf.generator.Permutation
  • pdgf.generator.Switch
  • pdgf.generator.ReferenceValue
  • pdgf.generator.ForFormula
  • pdgf.generator.PrePostfix
  • pdgf.generator.StaticValue
  • pdgf.generator.Hash
  • pdgf.generator.Padding
  • pdgf.generator.FormatString
  • pdgf.generator.DateTime
  • pdgf.generator.Id
  • pdgf.generator.LastChoice
  • pdgf.generator.MaskString
  • pdgf.generator.Null
  • pdgf.generator.AddRandomSeconds
  • pdgf.generator.RandomStringInRange
  • pdgf.generator.Formula
  • pdgf.generator.AbstractDecimal
  • pdgf.generator.FormatFloatingPoint
  • pdgf.generator.OtherFieldValue
  • pdgf.generator.RandomSentence
  • pdgf.generator.FormatNumber
  • pdgf.generator.Template
  • pdgf.generator.BigBenchReview
  • pdgf.generator.UpperLowerCase
  • pdgf.generator.For
  • pdgf.generator.Relative
  • pdgf.generator.RandomUniqeString
  • pdgf.generator.PermutationReference
  • pdgf.generator.UpdateActionType
  • pdgf.generator.FormatNumberAsDate
  • pdgf.generator.OldReferenceGeneratorDeprecated
  • pdgf.generator.DictList
  • pdgf.generator.ExtendedFormula
  • pdgf.generator.FormatDateAsNumber
  • pdgf.generator.If
  • pdgf.generator.GlobalRowNumber
  • pdgf.generator.LongNumber
  • pdgf.generator.UnsafeDistinct

Examples

  1. Null or Static Value

    Generates NULL (empty) or the number 1000.

    Schema config for Null or Static 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>
    
      <table name="Nulls">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Null or Static Value-->
          <!--Generates NULL (empty) or the number 1000.-->
          <field name="thousand_or_nothing" size="" type="NUMERIC">
            <gen_Null probability="0.5">
              <gen_StaticValue>
                <value>1000</value>
              </gen_StaticValue>
            </gen_Null>
          </field>
          </table>
    </schema>
    
    Output for Null or Static Value
    1000
    
    1000
    
    1000
    1000
    1000
    
    
    
    
  2. Null or Probability

    Generates NULL (empty) or a random word given by the specified probability distribution.

    Schema config for Null or Probability
    <?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="Nulls">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Null or Probability-->
          <!--Generates NULL (empty) or a random word given by the specified probability distribution.-->
          <field name="occupation" size="" type="VARCHAR">
            <gen_Null probability="0.1">
              <gen_Probability>
                <!-- Student -->
                <probability value="0.7">
                  <gen_StaticValue>
                    <value>Student</value>
                  </gen_StaticValue>
                </probability>
    
                <!-- Professor -->
                <probability value="0.1">
                  <gen_StaticValue>
                    <value>Professor</value>
                  </gen_StaticValue>
                </probability>
    
                <!-- Faculty Member -->
                <probability value="0.2">
                  <gen_StaticValue>
                    <value>Faculty Member</value>
                  </gen_StaticValue>
                </probability>
    
              </gen_Probability>
            </gen_Null>
          </field>
          </table>
    </schema>
    
    Output for Null or Probability
    Faculty Member
    
    
    
    Faculty Member
    Student
    Student
    Faculty Member
    Professor
    Student
2.6_#1486_b758 | 2016-05-24