Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Transformation Script - Get Comments from View

kohlinMay 11 2021

Hi,
I have a transformation script that is attempting to get all the attributes in a Logical Model view, and their comments (to be precise, the comments on the original entity's attribute).
So far, I have a script like this:
var viewName = "Property_v1";
var viewsIterator = model.getEntityViewSet().iterator();
var currentView = null;
while(viewsIterator.hasNext())
{
currentView = viewsIterator.next();
if(currentView== viewName);
break;
}var attributesIterator = currentView.getAttributeViewSet().iterator();
while(attributesIterator.hasNext())
{
attribute = attributesIterator.next();
sql += "\n" + attribute.getName() + ", " + attribute.getComment(); // No comments returned.
sql += "\n" + attribute.getName() + ", " + attribute.getOriginatingAttribute().getComment(); (getOriginatingAttribute doesn't exist).
sql += "\n" + attribute.getName() + ", " + attribute.getEntity.getAttributes()[attribute.getName()].getComment() // I didn't think this one would work/
}

Any suggestions would be appreciated.

Comments
Post Details
Added on May 11 2021
6 comments
132 views