Possible to run all scripts at once in a data generation project?
Cristy
Posts: 3 New member
Hi,
We have a project where we are generating a lot of columns for a table. We have a lot of python scripts as data generators for many of the columns.
I have noticed that when I change the number of rows to generate that I need to click run script on all of the columns that have a custom Pythons script. I've also noticed this needs to be done sometimes when one of the scripts needs to be changed. I have a few questions around this:
We have a project where we are generating a lot of columns for a table. We have a lot of python scripts as data generators for many of the columns.
I have noticed that when I change the number of rows to generate that I need to click run script on all of the columns that have a custom Pythons script. I've also noticed this needs to be done sometimes when one of the scripts needs to be changed. I have a few questions around this:
- Is there a function somewhere that runs all scripts within the project at one time, rather then having to choose each column?
- What does the Run Script button do? I've noticed that it errors out quite often if I've changed a script or modified the row count to generate. It would be helpful to understand what this button does.
TIA
Tagged:
Answers
Thanks for your post.
In SQL Data Generator we are not aware of any such button. Are you sure that you are referring to SQL Data Generator?
Kind regards
Richard Lynch.
Redgate Software
Yes, I am using SQL Data Generator, Version 4.0.2.1493.
I'm on the Column Generation Settings screen, where I have a custom Python Script as the generator.
I am unable to provide you a screenshot of my version, but this screenshot shows where the button exists for me. I am experiencing errors in the project if this Run script button is not pressed when changes are made, or the row count is changed.
If this value is changed to a higher value, then you need to click Run Script on all of the custom python scripts for the Row Count value to be updated accordingly.
So, my original question still stands. Is there a way to run this automatically for all Python Generator scripts within the project?
Thank you for your forum post.
Sadly the Run script will only run the python generator selected, so it will show the data that will be inserted in the preview. There is not a feature or option to run all python generator scripts within the project, except for the 'Generate Data.. button which runs and populates each table selected for data generation.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Other than the inconsistency in the number saved in the .sqlgen file, could you describe the problems that not running all the scripts causes you? I believe that when you run the data generation, the incorrect RowCount field for each of the Python generators is updated to the number of rows requested for the table in any case, and so the RowCount entry in the .sqlgen file specific to the generator is actually redundant?
Best wishes,
Julia Hayward
Technical Lead, SQL Toolbelt
Redgate Software