Email

Email

Generates E-Mail adresses. Uses two field references for firstname and lastname and a dictionary file for domains.

Attributes
Name Description Required Min Max Allowed Values
seed Random number generator seed of this Element. Overrides default seeding behavior. no 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
Nodes
Name Description Required Min Max Allowed Values
reference reference yes 2 2
file A path to a file to be used by a generator. See pdgf.generator.DictList source for a example. yes 1 1

Example

  1. Simple Names with Email Addresses

    Samples random first and last names from a dictionary. The email address is generated by concatenating fist and last name with a dot '.' followed by an at sign '@' and the mail provider sampled from the given dictionary.

    Schema config for Simple Names with Email Addresses
    <?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="Email">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Simple Names with Email Addresses-->
          <!--
            Samples random first and last names from a dictionary. The email address is generated by concatenating fist and
            last name with a dot '.' followed by an at sign '@' and the mail provider sampled from the given dictionary.
          -->
          <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="email" type="VARCHAR">
            <gen_Email>
              <reference field="first_name" id="firstname"/>
              <reference field="last_name" id="lastname"/>
              <file>dicts/mail_provider.dict</file>
            </gen_Email>
          </field>
          </table>
    </schema>
    
    Output for Simple Names with Email Addresses
    Annie|Pai|Annie.Pai@farce.de
    Helma|Pietrzak|Helma.Pietrzak@lawyer.com
    Ruthe|Gregory|Ruthe.Gregory@london.com
    Krystn|Konno|Krystn.Konno@RespectAnimals.com
    Ilyse|Xavier|Ilyse.Xavier@gmx.co.uk
    Ermina|Najafi|Ermina.Najafi@bulldogs.com
    Jayendra|VMXA|Jayendra.VMXA@amplimail.com
    Cuong|Zumhagen|Cuong.Zumhagen@mail.be
    Bev|Bates|Bev.Bates@shtrudel.net
    Jacquelynn|Crompton|Jacquelynn.Crompton@doctor.com
2.6_#1486_b758 | 2016-05-24