Activity overview
Latest activity by Sanjshah
Many thanks Robyn / comments
Many thanks Robyn
Many thanks Robyn, That makes sense not to share between users. Regarding the physical location, what is the currently and can I set this? Thanks
/ comments
Many thanks Robyn,That makes sense not to share between users.Regarding the physical location, what is the currently and can I set this?Thanks
Where is the SQL History data retained
Hi,Is it possible to share the location of data for SQL History, similar to the Snippets which can be saved to the custom location?Many thanks
Smalldatetime force 30 minute slots
Hi,I have a column that I am populating with a smalldattime, the start / end date is fine, however, I would like to force the Time part so that it only uses 1/2 periods rather than individual minut...
Many thanks Alex, That example is clear to understand.
Alex B said:
Hi @Sanjshah, SQL Data Generator uses IronPython and it appears this is still version 2.7 included with the install so a lot of newer functionality is not available (e.g. random.choices). You may be able to use something like the following to get a random selection from the list foo import clr
clr.AddReference("System")
from System import Random
random = Random()
def main(config):
# config["column_name"] is the column name
# config["column_type"] is the column datatype
# config["column_size"] is the column size
# config["n_rows"] is the number of rows
# config["seed"] is the current random seed
foo = list('abcde')
val = ''
if (col2 == 1) or (col2 == 2):
val = foo[int(random.Next(len(foo)))]
else:
val = 'awaiting'
return valAnd it gives you output like this:
[image] I hope that helps! Kind regards, Alex
/ comments
Many thanks Alex,That example is clear to understand.
Alex B said:
Hi @Sanjshah,SQL Data Generator uses IronPython and it appears this is still version 2.7 included with the install so a lot...