Skip to content
IRI Logo
Solutions Products
  • Solutions
  • Products
  • Blog
  • BI
  • Big Data
  • DQ
  • ETL
  • IRI
    • IRI Business
    • IRI Workbench
  • Mask
  • MDM
    • Master Data Management
    • Metadata Management
  • Migrate
    • Data Migration
    • Sort Migration
  • Test Data
  • Transform
  • VLDB
  • VLOG
rowgen logo

Test Data Functions in Java: The IRI RowGen SDK

  • by Sean James

IRI has completed its first Software Development Kit (SDK) for RowGen that Java programmers can call to generate test data dynamically in applications or across Hadoop nodes. This article introduces the library, and how you can use it to generate custom records with either randomly generated synthetic, and/or randomly-selected real, field values.

 

Functions

Functions for adding the fields are:

  • void – addField(Field)
  • void – addNonsetField(String, int)
  • void – addSetField(String, String)
  • void – addSetField(String, String, int)
  • void – clearFields()

Functions for generating the records are:

  • String – generateRecord()
  • ArrayList<String> – generateRecord(int)
  • ArrayList<String> – generateRecordArray()


ODataGen Object

The Java SDK for RowGen allows you to create an ODataGen object that will generate random data for fields inside the ODataGen object, and present them as records.

Example:
ODataGen exampleGen = new ODataGen();

 

Adding Fields

The Java SDK for RowGen has four different functions to add fields to an ODataGen object:

  1. The first way is to create a field and pass it into addField, and now that field will be in your ODataGen object.
    Example:
    exampleGen.addField(exampleField);
  2. You can use addNonsetField to add a non-set field of your chosen type and length to your ODataGen object.
    Example:
    exampleGen.addNonsetField(“NUMERIC”,3);
  3. You can use addSetField to add a set field of your chosen type and from your chosen set file to your ODataGen object.
    Example:
    exampleGen.addSetField (“ANY”,”C:/Users/User/example.set”);
  4. If you wish to add a set field that uses the “ROW” operation, you can pass that field into addSetField, which will add a set field of your chosen type, from your chosen set file, and your chosen column index to your ODataGen object.
    Example:
    exampleGen.addSetField (“ANY”,”C:/Users/User/example.set”,1);

You can also use clearFields on your ODataGen Object to remove all fields you added.

 

Generating Records

The Java SDK for RowGen has 3 different functions which help you create a record for your ODataGen object.

  1. You can call generateRecord, which will return a single record in String format.
    Example:
    String szExample = exampleGen.generateRecord();
  2. You can call generateRecord and pass in a numeric value to generate that many records for your ODataGen object.
    Example:
    ArrayList<String> manyRecordsExample = exampleGen.generateRecord(100);
  3. You can call generateRecordArray, which will return an array where each element in the array is random data for each field you added to your ODataGen object.  Note that the elements will be sequenced by the order in which you added them to your ODataGen object.
    Example:
    ArrayList<String> eachFieldExample = exampleGen.generateRecordArray();

 

Sample

The example output below is shown in the console window of the IRI Workbench GUI, built on Eclipse™. Two numeric fields were added (each with a length of five), along with an ‘any’ set field value from a file with twenty names in it (e.g., Mr. Brown and Mrs. Purple), to an ODataGen object:

consoleExampleFor20Names

And here is the code calling the RowGen API that created this test data:

consoleCodeFor20Names_1

consoleCodeFor20Names_2

Contact rowgen@iri.com if you are interested in working with the SDK.

Intra-Cell Search & Mask Feature of IRI CellShield EE [video]
Infonomics and You [video]
custom records Eclipse field values generate test data hadoop IRI RowGen IRI Workbench Java Software Development Kit real SDK synthetic

Related articles

Masking RDB Data in the…
Find & Mask File PII…
Data Class & Rule Library…
Connecting MariaDB and MySQL to…
The IRI Platform
IRI Test Data Generation
IRI Data Governance
Pseudonym Hash Set (File) Creation…
Consistent, Self-Updating and Secure Pseudonymization
IRI Voracity and Test Design…
Creating Set Files in IRI…

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Big Data 66
  • Business Intelligence (BI) 77
  • Data Masking/Protection 163
  • Data Quality (DQ) 41
  • Data Transformation 94
  • ETL 122
  • IRI 229
    • IRI Business 86
    • IRI Workbench 162
  • MDM 37
    • Master Data Management 12
    • Metadata Management 25
  • Migration 65
    • Data Migration 60
    • Sort Migration 6
  • Test Data 102
  • VLDB 78
  • VLOG 40

Tracking

© 2025 Innovative Routines International (IRI), Inc., All Rights Reserved | Contact