Red Gate forums :: View topic - hierarchical data Creation
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Generator 1
SQL Data Generator 1 forum

hierarchical data Creation

Search in SQL Data Generator 1 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Doug.Thompson



Joined: 01 Apr 2010
Posts: 1
Location: UK

PostPosted: Thu Apr 01, 2010 10:14 am    Post subject: hierarchical data Creation Reply with quote

Lets assume we have cols called:
- Country
- StateProvince
- Country
- City

You cant have independant data in there (eg there is no Arizona in Scotland or Edinburgh in Nebraska that I know of) so you need a dependancy.

#1
A quick fix for you is to allow for the column data to be provided via user stored proceedure when the passed value is a column key (eg $1 for colum one or $+2 for 2 cols away from this one).
The data patterns could be cached for the generate batch run. It taking a bit longer is better than not at all.
#2
You could always have data maps, where you select a file eg {$1}.txt and use a selection of values in there.
#3
You could have a VBScript breakout so that you could return the data you wanted. Slow but versatile.
#4
These lists need to be weighted so you can have a realistic demograghic.
#5
Introduce the $1 column selector into regular expressions so you can affect another column. There is a risk of cyclic dependancy but the easiest option is the USP (and Views) route I think.

Once the data is generated it would be nice to export the data as a drop/create/insert script (easy in sql2008) .

The only option I can see at the moment is running post production scripts trying to modify ver1 of the table using $1 as the first key feild, then doing it again with S2 and so on. How tedious is that.
We pay a lot for these redgate tools and this sort of features is quite realistic.


Thanks
Doug BN1.UK
Back to top
View user's profile Send private message AIM Address
Brian Donahue



Joined: 23 Aug 2004
Posts: 6641

PostPosted: Mon Apr 05, 2010 2:49 pm    Post subject: Reply with quote

We usually recommend the IronRuby generator as a possibility to insert derived data into the database. SQL Data Generator doesn't support basing new data fields on ones that are being inserted by the generator, but this is an alternative workaround that you can use without having to modify the database. For the complete information, please see:

http://www.simple-talk.com/dotnet/.net-framework/embedding-ironruby-and-the-dlr-into-sql-data-generator/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group