2 Replies Latest reply on Oct 10, 2013 4:02 PM by Marcus2014

    Custom Transformation Examples Collection

    Marcus2014

      Can anyone tell me where this is documented? 

       

      model.getTableSet().getByName(tname)
      

       

      I do not see an XML file for 'model'.  I want to know what other methods are available?  And has anyone written a whitepaper documenting how to do custom transformations?  I have been searching for examples but they are spread all over the place.  It is like 10 blind men describing an elephant.  Is there a collection of examples?  I have seen replies from Phillip with good examples and then he says, "Oh, that was for entities.  I posted another one for tables."  Posted where?  I am a 20 year veteran with Designer including the API and know the power of scripting/transformations and want to learn all about it.

       

       

       


        • 1. Re: Custom Transformation Examples Collection
          Philip Stoyanov-Oracle

          Can anyone tell me where this is documented?

          model.getTableSet().getByName(tname)

           

          you shoud start with datamodeler\datamodeler\xmlmetadata\doc directory and in README.rtf:

           

          Each collection with type xxxxxSet allows objects to be found by name ( method getByName(name) ) and by object ID (method getObjectByID(objectID) ).

          Collections for tables and views in relational model also allows object to be found by schema and name using method getBySchemaAndName(schema, name).

           

          Is there a collection of examples?

          The forum is not good place for that - we are going to create place for transformation scripts  for in SQL Developer exchange.

          Philip

          1 person found this helpful
          • 2. Re: Custom Transformation Examples Collection
            Marcus2014

            Thanks for the quick response.  I know everyone will look forward to being able to see other examples and to provide additional ones.  That will be a big help and will have less of an impact on your development team.

             

            Each collection with type xxxxxSet allows objects to be found by name ( method getByName(name) ) and by object ID (method getObjectByID(objectID) ).

            Collections for tables and views in relational model also allows object to be found by schema and name using method getBySchemaAndName(schema, name).

            This is great if you already know the class (model) and subclass/method (getTableSet()).  I need a rosetta stone to be able to go both ways.  I want to learn how to find the information needed to automate repetative operations.

             

            Collection definition provide createItem method that can be used to create item of that collection using instance of surrounding object – back to Tables collection we see that table can be created using model.createTable().

            When I look at the HTML or XML I cannot follow this statement.  In Tables.xml I see createColumns but no reference to model.createTable.  If I try to go to the parent of Table in the HTML it takes me to

            ContainerWithKeyObject not model.  I am trying to learn.  What am I missing?  Being a newbie, things are not as obvious to me as you seem to think. and by the number of questions on transformation scripts that I see, I am not alone.  What worries me are the people who are easily frustrated and not willing to gain the power of scripting and abandon SDDM completely.  I do not have the time to spend days exploring and experimenting to get something to work. 


            For example, if I want to go in and create unique key columns for all the tables that were engineered with surrogate keys for the primary key and that did not get unique key columns based on non PK UID attributes and relationships, I will have to spend days scouring the internet, hunting through XML and experimenting until I can even identify the columns associated with the UID.  And I do not expect anyone to do it for me.  I just want to be able to see an example of something similar and the be able to determine the classes and properties necessary to implement my solution.  And when I figure it out, I will share.