Lookup table data from IronPython data generation
Posted: Tue 04 Aug 2020 11:08
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
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