Update FeatureCalss Alias - the mythical arcpy.AlterAliasName

2591
4
04-12-2012 03:02 AM
MikeSweetman
New Contributor II
I have a funny - if I create a feature class via import XML workspace document the alias is just the feature class name eg COUNTY, but if I create it using arcpy.CreateFeatureclass_management the alias is schema name '.' feature class name eg GISLOADER.COUNTY.

I have not found a means to set the alias when the feature class is created, and as much as I read that 10.1 will have arcpy.AlterAliasName I'm at 10.0.

Any pointers in sorting this out, using ArcCatalog or arcpy ?

cheers

Mike
Tags (2)
0 Kudos
4 Replies
MikeSweetman
New Contributor II
For what its worth this is what I have learnt so far.

In the sde schema table sde_xml_doc1 the column xml_doc_val CLOB contains xml which is interesting.

Where my featureclass (PRUG_WKG) was loaded via xml workspace document import you would see:

      typens:Names ; PRUG_WKG ; false ; typens:PropertySet

Where my featureclass was created via a python script you would see:

      typens:Names ; false ; typens:PropertySet

So, I would imagine that is I could successfully edit this column, and probably regenrate the content of the XML_DOC BLOB column, I might get the effect I am looking for.

Anyone from ESRI wish to suggest how I do this without damaging my database ?

cheers Mike
0 Kudos
AndrzejBieniek
New Contributor III
In SDE schema there is a table SDE.GDB_FEATURECLASSES - you do select (ORACLE) like:

SQL> select id,name,aliasname from gdb_objectclasses where name like '%COUNCIL_WARDS_2012_RESULTS';

to find ID then update the alias and commit the changes:


SQL> update gdb_objectclasses set aliasname='NLC Councillors 2012' where id=1173;
1 row updated.
SQL> commit;

You need to refresh the connection in Arc Catalog to see your alias updated.

Have used that method several times - no problems so far.

Regards,
Andrzej
0 Kudos
MikeSweetman
New Contributor II
Hi Andrzej,

Thanks for the advice, I really thought I was on to a winner, BUT, in my 10.0 SDE schema I do not have a gdb_featureclasses or a gdb_objectclasses table. Are you using an earlier version perhaps?


I have looked for columns with ALIAS in their name, but only have SDE.SDE_XML_INDEX_TAGS.TAG_ALIAS.

SDE.GDB* tables I have are GDB_ITEMS, GDB_ITEMRELATIONSHIPTYPES, GDB_ITEMRELATIONSHIPS, GDB_ITEMTYPES, GDB_REPLICALOG, GDB_TABLES_LAST_MODIFIED.

thanks

Mike
0 Kudos
AndrzejBieniek
New Contributor III
Hi Andrzej,
Are you using an earlier version perhaps?


Yes, we are still having SDE 9.3.1 on production server. The table might be gone in 10...

Regards,
Andrzej
0 Kudos