Page 1 of 1

Lookup table data from IronPython data generation

Posted: Tue 04 Aug 2020 11:08
by drummersi
I'm looking into data generation to see if it'll be useful for my company..
I see there's lots of templates available and even customisation using Python Scripts.

However, is it possible to run an SQL query from Python?



Basically I have a requirement to check if a certain field is a certain value. Then based on that value obtain a random value from a specific table.


A very simple example follows:
if role_id = 1, SELECT random id from admins
if role_id = 2 SELECT random id from editors

Re: Lookup table data from IronPython data generation

Posted: Fri 07 Aug 2020 05:33
by YuriP
Sorry, but we need a little more information.
Could you describe your problem more detail?
Did your try to use dbForge Data Generator to solve your tasks?