cancel
Showing results for 
Search instead for 
Did you mean: 

physical model - best way to save column name

Former Member
0 Kudos


Hi

I am using PD 16.5 SP03 PL03. I am reviewing a table in a physical model that has 100 columns. The column names given are all cryptic and do not meet standards. I am in the process of Changing the column names to more meaningful names. But we have a ETL mapping already defined for this table using the existing non-standard columns. So it is important for me to remember what I have changed so I can apply the same changes to the etl mapping document.

My question is, Is there any way I can create a hidden column in PD for the table (in fact to all the tables in the model) and run a script to copy the current Code to this hidden column.  This way once i change the name, I can produce a listing (with the help of hidden column), old name and new name.

thank you

Krishna

Accepted Solutions (1)

Accepted Solutions (1)

former_member192453
Active Participant
0 Kudos


You can create an extended attribute on the Column metaclass to store the value of the original column. You can then write a VBscript to populate the extended attribute. If you do not want write a VBscipt, you can also import the information from Excel.

For example, I did the following:


Open Table Properties and select the Column tab

Display the Parent column

Export the list to Excel

In Excel, I rename the Name column to OldName

I modified my spreadsheet to something like the following:

                         

Parent CodeOldName
Table_2COLUMN_1Apple
Table_2COLUMN_2Sirloin
Table_2COLUMN_3Pasta

Attach the Excel Import extension file
Import the Excel file as Table.Column
Click through the Import wizard, for the OldName column, click the New tool to create an extended attribute

End result is something like the following:

You can then decide to hide or display the OldName column.

Regards,

Anthony

Former Member
0 Kudos

Thank you  Anthony.  I was able to create the additional column and copy the code to the new column using the script.

Appreciate your help.

Krishna

Answers (1)

Answers (1)

GeorgeMcGeachie
Active Contributor
0 Kudos

If you've reverse0engineered this model, you'll find the object names and codes are identical. I suggest that you leave the object codes in PD as they are (so they match the names used in the database), and vary the object names in PD.

I would run the code-to-name synchronisation (via Model Options), using your list of standard abbreviations if you have one. The codes will reflect the names used in the database, and the names will be more meaningful - you can edit the names after synchronising them if you want to.

So you could have a column with:

Name = "Division Name"

Code = "DIV_NM"