LongNumber

LongNumber

Generates a 64Bit Integer value within the range [min, max] Distribution of values as specified in parameter distribution

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
max Content type: Long
Maximum value to generate (inclusive). Highest value: 2^63-2 (=Long.MAX_VALUE - 1)
yes 1 1
unique Generates random number in specified range but picks them uniquely. This requires the specified range (max-min+1) to be greater then the number of rows/ID's of the parent table. E.g. with a table size of 100 rows the range must be >=100 e.g.: min=1000, max=2000 no 0 1
  • true
  • false
  • 0
  • 1
min Content type: Long
Minimum value to generate (inclusive) -2^63
yes 1 1
distribution Distribution to be used by a generator when calculating a value no 0 1
  • bankmark.pdgf.distribution.Logarithmic
  • bankmark.pdgf.distribution.Beta
  • bankmark.pdgf.distribution.Normal
  • bankmark.pdgf.distribution.Exponential
  • bankmark.pdgf.distribution.Zeta
  • bankmark.pdgf.distribution.Binomial
distinct Content type: Long
Number of distinct values (< 1 = deactivated) being generated.
Example:
<min>1</min>
<max>10</max>
<distinct>3</distinct>
will only generate only the three distinct values within the given interval e.g.: 3, 5 and 10 as result.
Default: 0
no 0 1
Sub-Parameters
Parent Name Description Required Min Max Allowed Values
min gen Value Generator for this field no 0 1
max gen Value Generator for this field no 0 1
distinct gen Value Generator for this field no 0 1

Examples

  1. Uniform Long

    Generates an random 64Bit Integer value uniform within the range [min, max]

    Schema config for Uniform Long
    <?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="Customer">
      <!-- if tables should scale with -SF command line argument. Specify your scaling formula here: -->
      <size>10 * ${SF}</size>
    
      <!--Uniform Long-->
        <!--Generates an random 64Bit Integer value uniform within the range [min, max]-->
        <field name="basic_longGenerator" size="" type="NUMERIC">
          <gen_LongGenerator>
            <min>-10</min>
            <max>10</max>
          </gen_LongGenerator>
        </field>
        </table>
    </schema>
    
    Output for Uniform Long
    8
    -8
    0
    -2
    9
    7
    8
    -3
    -6
    -7
  2. Uniform Long with Formula

    Generates an random 64Bit Integer value uniform within the range [min, max] using formulas and properties. Generate a number with the value range depending on the logarithmic scaling factor $SF

    Schema config for Uniform Long with 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>
    
    <table name="Customer">
      <!-- if tables should scale with -SF command line argument. Specify your scaling formula here: -->
      <size>10 * ${SF}</size>
    
      <!--Uniform Long with Formula-->
        <!--
          Generates an random 64Bit Integer value uniform within the range [min, max] using formulas and properties.
          Generate a number with the value range depending on the logarithmic scaling factor $SF
        -->
        <field name="formula_longGenerator" size="" type="NUMERIC">
          <gen_LongGenerator>
            <min>0</min>
            <max>100 + Math.log(${SF}) * 10</max>
          </gen_LongGenerator>
        </field>
        </table>
    </schema>
    
    Output for Uniform Long with Formula
    0
    91
    9
    5
    82
    96
    58
    66
    74
    27
  3. Distinct Long

    Generate only n distinct numbers within a given number range.

    Schema config for Distinct Long
    <?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="Customer">
      <!-- if tables should scale with -SF command line argument. Specify your scaling formula here: -->
      <size>10 * ${SF}</size>
    
      <!--Distinct Long-->
        <!--Generate only n distinct numbers within a given number range.-->
        <field name="distinct_longGenerator" size="" type="NUMERIC">
          <gen_LongGenerator>
            <min>0</min>
            <max>100</max>
            <distinct>4</distinct>
          </gen_LongGenerator>
        </field>
        </table>
    </schema>
    
    Output for Distinct Long
    21
    64
    21
    49
    49
    6
    21
    49
    6
    64
  4. Non-Uniform Long

    Generates an 64Bit Integer value within the range [min, max] using

    Schema config for Non-Uniform Long
    <?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="Customer">
      <!-- if tables should scale with -SF command line argument. Specify your scaling formula here: -->
      <size>10 * ${SF}</size>
    
      <!--Non-Uniform Long-->
        <!--Generates an 64Bit Integer value within the range [min, max] using-->
        <field name="nonUniformDistribution_longGenerator" size="" type="NUMERIC">
          <gen_LongGenerator>
            <min>0</min>
            <max>100</max>
            <!-- "Normal" or Gaussian distribution. In this example that most frequent value is the number 5 (mean) with a
                 standard deviation (sd) of 2. Meaning of the parameters:  ~68% of all generated values will be within
                 range: [mean-sd, mean+sd] = [5-2, 5+2] = [3,7] This is also the range with the most frequent numbers. -->
            <distribution mean="5" name="Normal" sd="2"/>
          </gen_LongGenerator>
        </field>
        </table>
    </schema>
    
    Output for Non-Uniform Long
    6
    5
    1
    9
    7
    6
    5
    6
    6
    6
2.7-83fb0 | 2020-04-22