Forum Stats

  • 3,780,903 Users
  • 2,254,454 Discussions
  • 7,879,490 Comments

Discussions

Table DDL Transformation Scripts: Where are they stored

mmagan-Oracle
mmagan-Oracle Member Posts: 30 Employee

Hi,

I defined a new Table DDL Transformation script set and added a script. I'd like to have this under version control, but it appears not to be saved with the design.

I see the set when opening SDDM with the default blank project, so it would appear to be in some (non-project) location. But where is it?

Thanks,

Michael

Best Answer

  • Philip Stoyanov-Oracle
    Philip Stoyanov-Oracle Member Posts: 3,367 Employee
    edited Jun 23, 2020 6:21AM Accepted Answer

    Hi Michael,

    they are stored in dr_custom_scripts.xml file in "System data types" directory:

    default_system_types_directory.png

    It's default location is in datamodeler\datamodeler\types directory of DM installation.

    You can change that directory to be under version control. If that directory is not under version control then customer is asked to add it under version control when design is added to SVN/Git.

    In both cases DM controlled files are copied to the new location.

    Philip

Answers

  • Philip Stoyanov-Oracle
    Philip Stoyanov-Oracle Member Posts: 3,367 Employee
    edited Jun 23, 2020 6:21AM Accepted Answer

    Hi Michael,

    they are stored in dr_custom_scripts.xml file in "System data types" directory:

    default_system_types_directory.png

    It's default location is in datamodeler\datamodeler\types directory of DM installation.

    You can change that directory to be under version control. If that directory is not under version control then customer is asked to add it under version control when design is added to SVN/Git.

    In both cases DM controlled files are copied to the new location.

    Philip

  • mmagan-Oracle
    mmagan-Oracle Member Posts: 30 Employee
    edited Jun 27, 2020 2:07AM

    Thanks Philip, that is helpful. I have a follow-up question. The product seems to assume that certain artifacts (domains, transformation scripts) are stored separately from the model. I would prefer to have the model self-contained so you can:

    1. Clone the model from a git repo
    2. Install DataModeller
    3. Open the model
    4. Get to work

    . If I want to store *everything* in a single git repo, (i.e. nothing in a shared location and nothing in the local installation) then what is the recommended procedure and folder structure? I.e. should I create a system_types folder at the same level as the .dmd file? Or should it be within the design folder structure?

  • Philip Stoyanov-Oracle
    Philip Stoyanov-Oracle Member Posts: 3,367 Employee
    edited Jun 29, 2020 7:17AM

    Hi Michael,

    If I want to store *everything* in a single git repo, (i.e. nothing in a shared location and nothing in the local installation) then what is the recommended procedure and folder structure?

    You can look at documentation

    https://docs.oracle.com/en/database/oracle/sql-developer-data-modeler/20.2/dmdug/data-modeler-concepts-usage.html#GUID-D…

    should I create a system_types folder at the same level as the .dmd file?

    Yes, you can do it in that way. In my example I used intermediate folder for each design but that is not obligatory. It's not good to have system data types folder under design directory.

    Otherwise - some element could be local for design (domains, RDBMS sites) or shared by several design (then they are in system data types folder). In similar way design level settings are 'local" but they can be inherited from global settings.

    Philip

  • mmagan-Oracle
    mmagan-Oracle Member Posts: 30 Employee
    edited Jul 1, 2020 9:31AM

    Trying to follow the instructions above. Project directory is under (Subversion) version control. I created a folder 'system_types' and set the Default System Types directory to this folder. This results in the message:

    pastedImage_0.png

  • Philip Stoyanov-Oracle
    Philip Stoyanov-Oracle Member Posts: 3,367 Employee
    edited Jul 2, 2020 3:10AM

    I thought we are talking about gut - for SVN it's better to have intermediate directories. In Git you clone repository, in SVN a directory is checked-out. So directory structure could be:

    -top_dir_for_all_designs

    |_system_types_dir

    |_design1_container_dir

        |design1.dmd

        |_design1(directory)

    Well that is just an warning

    Philip