In order to overcome some of the issues I’ve mentioned elsewhere I want to customise some parts of the RE script. I’m using TDM 3.1.5.6 with Oracle 9i (and soon 10g).
I’ve tried following the Help Manual pages (I managed to customise a report following them).
How do I find the information on which package to extend, what data types the parameters are, etc.
Can I replace any functions? For example as a starter I want to alter LoadViews in PERDataMigratorDBOR to remove the quotes round the column aliases.
I’ve so far been unable to get my version of LoadViews to be run.
Unfortunately, at the moment it is difficult for users to customize the scripts on their own (and it’s not only because of lack of documentation on this issue). The reason is that we need to make it more easier and user friendly. Changes and improvements in this issue are already under way. -> The main priorities for next version 3.2 are: Optimization of the application code, scripting method, speed and memory consumption.
As soon as final code and scripting method are known, we will start
to document it. In our Modeling community, Blog is planned. We will continuously
publish some tips on scripting, how-tos etc. there (even before the next official release 3.2).
Generally, there are two ways of customization now:
Extend system packages.
Edit system packages and scripts.
AD1]
This is a method that our team prefers.
Advantage - user changes will be preserved during the application update, system packages and scripts will be updated.
Unfortunately, as written above, changes and improvements are planned. For now, appropriate documentation is not available.
AD2]
This is a quite easy way (will be described below).
Disadvantage - With an application update, the modified system package will be always overwritten.
Malcolm, if you like to try to modify a system package to get the required result, please take the following steps:
Find a location where you store system packages. Default location:
C:\Program Files\Quest Software\Toad Data Modeler 3\Packages\System
Find the package OREDBOR.txg.
In the package properties, disable the Read Only property.
Launch TDM3 and open Script Explorer (Tools menu).
In the Script Explorer, find the DataMigratorDBOR script and double-click it to open it in Script Editor.
Find function LoadViews.
In the LoadViews function, find the following line:
Aliases += ‘"’+SubQuery.GetFieldValue( ‘COLUMN_NAME’ )+’"’;
Make the modifications you need, remove quotes you don’t want.
Press Commit to save the changes in the script.
Now you can do the RE to see the changes.
If you like to save the changed script in the package, open the Package Explorer, select the package and save it. (Or simply close TDM3, the package will be saved automatically.)
If you plan to make more modifications, we recommend to save the changes continuously (in the script and package too).
Malcolm, if you have any questions, please write us back. Thanks.
I was hoping to be able to use method 1 to extend the system packges rather than edit them directly.
I had made some changes to the previous version’s system packages but I wanted to do it “properly” this time in the hope I wouldn’t have to keep repeating the customisation with each new TDM release.
I had made some changes to the previous version's system packages but I wanted to do it "properly" this time in the hope I wouldn't have to keep repeating the customisation with each new TDM release.
Yes, we understand. Unfortunately, TDM3 is not fully ready for this yet. Our developers are working at it. I'm afraid, we need to ask you for patience. Thanks very much.
I’ve decided to take the route of creating scripts to make the changes I require after the model has been REd.
This leads to another question…
…is it possible to make a connection to a specified database from a script?
I was looking up some data from one of our tables. This will require connection to an Oracle 9 or 10 database with a known connection string, then selecting data from a table.
...is it possible to make a connection to a specified database from a script?
Unfortunately, it is not possible.
Extending packages issue
Malcolm, I'd like to ask you for patience. We've discussed it with our developers. We will try to make a 'how to' movie tomorrow for you.