Teradata DB DDL Reverse

General discussions about code engineering

Moderator: Moderators

Teradata DB DDL Reverse

Postby asamoakr » Wed Nov 21, 2012 8:45 am

Hello there,

I am looking to extend the Generic DDL to support Macros and Procedures in Teradata.

At the moment all I am looking for is to be able to see the classes represented in MDUML (version 14 sp1 is what I am using).

I would like to know how to extend the Generic DDL Profile.

Is it going to be a case of creating some OpenAPI extensions or Customisations or just Sterotypes for Macros and Procedures?

PS: How come there is NO Teradata flavor for the Code Engineering Reverse already?

I noticed I am posting the first Teradata topic in this forum, really???

Anyhow, thanks for your anticipated support.

Leslie A.
asamoakr
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:0
Joined: Fri Nov 02, 2012 3:55 am
Location: Europe
Full name: Leslie A

Re: Teradata DB DDL Reverse

Postby asamoakr » Sun Dec 23, 2012 10:22 pm

Here is a post that is leading to the direction I want to go:
metadata-common-warehouse-model-cwm-related-t2494.html
asamoakr
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:0
Joined: Fri Nov 02, 2012 3:55 am
Location: Europe
Full name: Leslie A

Re: Teradata DB DDL Reverse

Postby TomasJkn » Wed Jan 02, 2013 10:03 am

Hello dear Leslie,

Sorry for delay with response; end-of-the-year festivities have intervened a bit.
----------------------------------------------------

I noticed I am posting the first Teradata topic in this forum, really???

That may be true; Teradata is not often requested database flavor to be supported.
I am hard pressed to remember any customer requests regarding Teradata specifically.
While we do know of this company and it was/is on our "radars" internally, on the level of talk among devs,
but this have not materialized into anything more substantial (not evaluated as possible feature; not in roadmaps; etc).
The whole field of DB engineering in MagicDraw is stagnating a bit :/

For partial import of the database structures of Teradata, you could try generic DB flavor / reverse from JDBC connection.
Since Teradata has JDBC drivers, this path should be OK for importing at least the basic information (which is common across all databases) -
such as tables/columns/keys. Procedure import through JDBC is not supported in any case, but this will get you half way.


I would like to know how to extend the Generic DDL Profile.
Is it going to be a case of creating some OpenAPI extensions or Customisations or just Sterotypes for Macros and Procedures?


That is a tricky question. It depends on what exactly you are trying to achieve (which activities) and what kind of information you need to carry in the model.

If the question is only about MODELING of macros and procedures, then the only question is how the semantics of Teradata macros and procedures differs from UML.
IF you just need to model something with a name + parameters with names and types(and possibly directions) + return type, THEN the standard UML method may be sufficient and you do not need to invent any additional stereotypes/customizations/anything else.

If there is some semantic gap between Teradata macros/procedures (i.e. there are some aspects in this system that pure UML is incapable to cover) then this semantic gap should be covered with some custom stereotype ("TDProcedure", "TDMacro" or some such), introducing additional tags, carrying semantic meaning.

Now I do not know about the Teradata macros, but IF Teradata procedures are at least similar to standard SQL stored procedures, THEN you may want to look into the newer MagicDraw version.
In the version 17.0.1 database modeling has been re-engineered a bit in MagicDraw, and a new profile has been developed - unifying the previously-separate Oracle DDL and Generic DDL modeling under single base profile (+flavor-specific extensions profile). This new profile has built-in support for SQL stored procedure modeling.

If you want to try the upgrade, be sure to get Cameo Data Modeler plugin (CDM) with MagicDraw - database functionality has been extracted from main MagicDraw body and placed into the CDM plugin. So now it is not enough to buy the MD (not even Enterprise version). On the other hand, now MD Standard users can buy CDM, and get the database modeling functionality, instead of buying MD Enterprise.

Customization is optional in any case since customization is only an instruction set to MagicDraw application on how to handle the model (how to present it in GUI - in diagrams, specification windows, what actions are available - e.g. what connections it has, in what other elements can it be created etc).

----------------------------------------------------

However I suspect that you want to do more than just model the macros and procedures. You probably want to reverse engineer the macros/procedures from Teradata database into the model and possibly also generate them back.

Unfortunately in this front we can not help you much. The reverse engineering/generation capabilities are what they are and not really extensible.
Developing a custom profile(or modifying/extending the standard one) will only enable modeling of your custom things, adding nothing to reversing/generation capabilities.

For custom generation there is a workaround - you could use the report engine to generate the custom files from your custom model information. Since report can be not only Word/.doc files but also any custom text files, custom DDL can be created by preparing custom report. But in any case you will need to prepare such a report yourself.

For custom reverse, I see no other option than writing a custom code from scratch. This code could be Java (wrapped into MD plugin) or any scripting language supported by MD (JavaScript, Python, Ruby etc; see menu>Tools>Macros).

If the project that you have is really big, you could contact your sales executive - Tadas (I think you already know him quite well), and cut some custom development deal.

Sincerely,
--
Tomas Juknevicius
Tomas Juknevicius
Senior Systems Analyst
No Magic Europe
TomasJkn
Customer Support
Customer Support
 
Posts: 63
Posts Rating:6
Joined: Mon May 10, 2010 9:24 am

Re: Teradata DB DDL Reverse

Postby asamoakr » Thu Jan 03, 2013 5:33 am

Thank you Tomas! Happy New Year to you too.

I have upgraded to 17.0.3 with CDM and now setting up so I can give your suggestion a try.

To clarify, I do not expect to do any Model Driven SQL/Macro development - however now that you mentioned it, I will have that on my roadmap :idea: . The solution is purely about reversing what is in the database and creating a metadata library - effectively a metadata profile what exists and how it has been created.

There may be a challenge of catering for gaps and there I will surely need help. I will get on the emails to Tadas asap :)

Thanks again!
asamoakr
Forum Newbie
Forum Newbie
 
Posts: 6
Posts Rating:0
Joined: Fri Nov 02, 2012 3:55 am
Location: Europe
Full name: Leslie A


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests