Data Generator Rules - EcoSys - Customization & Programming - Hexagon

EcoSys Gateway Web Service API Client

Language
English
Product
EcoSys
Search by Category
Customization & Programming
EcoSys Version
9.0

@SERIES: Numeric Series with Prefix

A series rule will include an optional prefix followed by a numeric value in a specified range. The numeric value will increment from start to finish within the specified range, and then repeat from the start again until the requested number of records is reached. This is appropriate for text or numeric (using a blank prefix) type fields.

@SERIES:{prefix};{range start};{range end}

@RANDOM: Random Number with Prefix

A random rule will include an optional prefix followed by a random numeric value in a specified range. The numeric value will be random within the range for each generated record. This is appropriate for text or numeric (with blank prefix) type fields.

@RANDOM:{prefix};{range start};{range end}

@DATE: Date (Random)

A date rule will produce a random date within the range specified (start date and end date). This is appropriate for date type fields.

@DATE:{yyyy-MM-dd};{yyyy-MM-dd}

Example Data Generator Syntax

Example input file syntax for test mode:

ProjIdTABProjNameTABProposedDateTABEstimatedCost

@SERIES:PROJ;1;100TAB@SERIES:Project ;1001;1100TAB@DATE:2014-01-01;2014-12-31TAB@RANDOM:;10000;30000

This example demonstrates the following rules:

  • ProjId — a series from 1 through 100 with prefix "PROJ". Example: "PROJ5"

  • ProjName — a series from 1001 through 1100 with prefix "Project ". Example "Project 1005"

  • ProposedDate — a random date between 2014-01-01 and 2014-12-31. Example: "2014-09-19"

  • EstimatedCost — a random number between 10,000 and 30,000, with no prefix. Example: "22,840"

Not every field must contain a generation rule, you may include simple values and they will be used as specified for each record.

 The series values will loop back to their start range if the number of records being generated exceeds the end of the range. Due to this, when generating unique values, set the end of the range to a very high number. For example, "@SERIES:PROJ;1;99999999". Series values are independent of each other, so they progress in parallel if more than one is defined on the template line.