Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: dana n on August 06, 2009, 08:04:46 pm
-
Is it possible to script EA to retrieve a pre-specified set of tables from two databases, export the DDL, then run a diff?
If so, what is the learning curve--and better yet, does anyone have some code I could modify?
Is there a good tutorial out there for scripting EA?
Thanks very much.
Dana
-
Also, is there any way to script EA to dump (domain) table data? I have a database schema on 4 instances (DD > DT> DQ > DP) and worry about mutating domain table / lookup data. I need an automated way to verify that all values in specific domain tables are identical across all instances. Can EA help me do that?
I am crafting some Python to do this, but thought I'd ask before I reinvent any wheels.
-
I don't think EA will handle domain tables in the sense you describe. You might be able to craft an add-in for this, but DDL generation and schema import will be up to you. EA does not allow us to tweak these functions.
Please submit feature requests for any of the above (including domain support in data modeling) you require. Use the Feature Request link near the bottom of any forum page. Perhaps if enough of us do this, and maintain the pressure, Sparx will (finally) add these features to EA.
-
I don't think EA will handle domain tables in the sense you describe. You might be able to craft an add-in for this, but DDL generation and schema import will be up to you. EA does not allow us to tweak these functions.
Please submit feature requests for any of the above (including domain support in data modeling) you require. Use the Feature Request link near the bottom of any forum page. Perhaps if enough of us do this, and maintain the pressure, Sparx will (finally) add these features to EA.
Thanks Midnight. I also submitted a Feature Request for scripting of reverse and forward engineering.
I wish EA would have something like Oracle's SQL Developer Exchange, where users submit features, and other users vote for, and score, those features. Then Oracle follows up with a status for each suggested feature, e.g. rejected, schedule for release X.Y, under consideration by development team, etc:
http://sueharper.blogspot.com/2006/08/sql-developer-exchange-is-launched.html
I've submitted several new feature requests for SQL Developer this way and have voted on pre-existing feature requests that I'd find useful.
Doesn't the YABB forum software have a voting feature?
Dana
-
I don't think EA will handle domain tables in the sense you describe. You might be able to craft an add-in for this, but DDL generation and schema import will be up to you. EA does not allow us to tweak these functions.
This is disappointing.
A colleague of mine told me EA had a scripting ability. In my mind, I assume you could script any operation.
I guess I have been spoiled by ESRI. Its ArcGIS Deskop allows you to script every geoprocessing tool in the software via a special Geoprocessing Object. It is accessed via Python (fun language, and the only language I know at the moment, aside from some remaining Perl in my brain from my sysadmin pre-data modeling days).
I love how ESRI has adopted Python as its geoprocessing scripting language because it's easy to get started with and is non-proprietary. Dozens of books out there on Python vs. zero books on EA and its scripting language?
So... what precisely *can* I script in EA? Transformations only?
-
Hi Dana,
Yes, it is disappointing. But making enough feature requests just might unlock this somewhere down the line.
FWIW...
I have had some success in writing my own transformation code, in either or both directions. Of course this means picking the engine(s) I want to support. And the code I have written has been keyed to whatever style I was using at the time (to some extent at least). It is a somewhat bigger job to write a general purpose DDL engine. I often think about starting such a quest but generally give it up in case Sparx finally does this; I'd hate to have all that work made obsolete.
What I have been successful with is transforming a 'core' data diagram into a more complex schema, complete with history and other support facilities. Often these span more than one schema. At the same time I generate related check and other constraints, stored procedures, and triggers, all based on the core structure and whatever paradigm I am designing into. The output is reflected back into the EA model - this often involved replacing the core with a more rigorous model fragment as well as extending to other tables - and can also generate the DDL necessary to build the database. I can also use EA to generate the DDL, but this often results in several fragments. EA is also very fragile when multiple schema names (and other DDL settings) are involved. This can result in problems when designing for more than one schema or DBMS in parallel.
David
-
Dana,
The API is indeed somewhat limited as far the the built-in functions in EA goes, but it does allow you to visit the model elements and all of their properties.
So you might not be able to take advantaged of the build-in DDL transformations, but you can surely roll your own.
The language you write the scripts in does not really matter.
Anything that can talk to a COM object will do.
I've written stuff for EA in the past in VB, VBA, VB.Net, C# and Java, but I guess python or perl should work too, as long as you find some kind of COM bridge in that language.
Geert