Forum Stats

  • 3,826,599 Users
  • 2,260,673 Discussions
  • 7,897,024 Comments

Discussions

How to initialize UDP values in oracle Data modeler in relational model

I have defined some UDP for each column i want to set them through nashorn script can someone help

Best Answers

  • Dave Schleis
    Dave Schleis Member Posts: 225 Silver Badge
    edited May 9, 2022 2:15PM Answer ✓

    Hello

    I created a column level UDP named "UDP_1"

    Then, starting with the provided script "Tables to lowercase - Rhino", I created this script to set the value of the UDP_1 property of all of the columns in all of the tables to "bingo".

    Not exactly what you are asking for, but it should show you the way.

    tables = model.getTableSet().toArray();

    for (var t = 0; t<tables.length;t++){

     table = tables[t];

       columns = table.getElements();

       for (var i = 0; i < columns.length; i++) {

        column = columns[i];

        column.setProperty('UDP_1','bingo');

        column.setDirty(true);

        }

       }


    Hope this helps

    --dave

    user2029739
  • user2029739
    user2029739 Member Posts: 6 Green Ribbon

    It was great help David

Answers

  • Dave Schleis
    Dave Schleis Member Posts: 225 Silver Badge
    edited May 9, 2022 2:15PM Answer ✓

    Hello

    I created a column level UDP named "UDP_1"

    Then, starting with the provided script "Tables to lowercase - Rhino", I created this script to set the value of the UDP_1 property of all of the columns in all of the tables to "bingo".

    Not exactly what you are asking for, but it should show you the way.

    tables = model.getTableSet().toArray();

    for (var t = 0; t<tables.length;t++){

     table = tables[t];

       columns = table.getElements();

       for (var i = 0; i < columns.length; i++) {

        column = columns[i];

        column.setProperty('UDP_1','bingo');

        column.setDirty(true);

        }

       }


    Hope this helps

    --dave

    user2029739
  • user2029739
    user2029739 Member Posts: 6 Green Ribbon

    It was great help David