0

I have a raster (ras) and a text file (T, DA, etc). When I join both then field names are like following:

ras.vat:T
ras.vat:DA

I have to access these fields using SearchCursor for further processing. Is there a way to avoid these long combined names and simply obtain "T" and "DA" after joining?

Ibe
  • 1,231
  • 3
  • 20
  • 37
  • No, it's always been that way - back to ArcINFO. It's a way to separate the joined fields between feature classes. Theoretically you could have the same field in the join 'from' and the join 'to' feature class and they need to be both accessible hence the long join name. – Michael Stimson Apr 27 '14 at 03:53
  • 3
    Yes you can. Here is the link with explanation:http://gis.stackexchange.com/questions/43400/how-to-join-tables-without-losing-the-original-field-names-in-arcgis I used arcpy.env.qualifiedFieldNames = False in script to retain original names. – Ibe Apr 27 '14 at 04:29
  • Thanks @Ibe that's a new one by me, they change things from time to time and I can't check everything so I'll be the first to admit that I'm incorrect. How then does it resolve FeatClass.Field against RelatedTable.Field if the name is the same? – Michael Stimson Apr 27 '14 at 05:52
  • The join field is same as before with arcpy.JoinField_management but original names as given in tables will become Field names if use arcpy.env.qualifiedFieldNames = False. You can control it from "Environment/Fields" if running inside ArcGIS. – Ibe Apr 27 '14 at 17:26
  • I am unclear - have you answered your own question and it is a duplicate of the one you have linked to, or do you still have the problem despite setting that variable? – Chris W Apr 27 '14 at 18:57
  • @ChrisW: I answered myself. It is a duplicate except I also figured how to do it in a standalone script. – Ibe Apr 27 '14 at 19:44
  • I might then suggest either revising the question (title) to specify 'in a script' and adding your variable comment as an answer with a link to the other question, or adding your additional information (as answer or edit) to the other question and flagging this one as a duplicate. – Chris W Apr 27 '14 at 20:18

1 Answers1

0

I figured it out myself. Here is the link with explanation: Joining tables without losing original field names in ArcGIS for Desktop? I used arcpy.env.qualifiedFieldNames = False in script to retain original names.

Ibe
  • 1,231
  • 3
  • 20
  • 37