Page 1 of 1

Data Generator - Python script use existing generators

Posted: Wed 25 May 2022 09:50
by Cynicszm
Hi all,

We would like to use some of the existing meaningful generators within a python script depending on the value in another column.

I can't seem to find any existing documentation on how to do this.

For example:

Code: Select all

if type_cd (column) is 'ISIN' then use the InternationalSecuritiesIdentificationNumber(ISIN,ISO6166) generator
else if type_cd = 'CUSIP' then use the USCommitteeonUniformSecurityIdentificationProceduresCode(CUSIP) generator
else if type_cd = 'X' then generate using a custom Regex
else... 
Any help appreciated

Re: Data Generator - Python script use existing generators

Posted: Thu 26 May 2022 08:21
by dzhanhira
Hi there,

Unfortunately, only one RegexGenerator is available in a python script right now.

The use of other meaningful generators is not available. We will add this as a suggestion to convert it into a feature request for our future versions.

An example of using RegexGenerator can be found here: https://docs.devart.com/data-generator- ... rator.html

Re: Data Generator - Python script use existing generators

Posted: Thu 21 Jul 2022 01:33
by heravinluca
dzhanhira wrote: Thu 26 May 2022 08:21 Hi there,

Unfortunately, only one RegexGenerator is available in a python script right now.

The use of other meaningful generators is not available. We will add this as a suggestion to convert it into a feature request for our future versions

An example of using RegexGenerator can be found here: https://docs.devart.com/data-generator1v1 battle-for-sql-server/using-generators/python-generator.html
Specific and easy-to-understand examples. Thank you so much for the information you shared

Re: Data Generator - Python script use existing generators

Posted: Fri 05 Aug 2022 08:22
by .jp
Hello,

Please also have a look at:
https://docs.devart.com/data-generator- ... mples.html

Best Regards.