tiernan

"Join Data" in Python Script

Discussion created by tiernan on May 2, 2011
Latest reply on May 3, 2011 by mzcoyle
I would like to use the "Join Data" function that is available when you right-click a feature class in the Table of Contents. But I need to call it from Python. Does anyone know how to access this function from Python? I am trying to join fields from a DBF to the attribute table of a shapefile. I want to use "Join Data" because it's quick and it doesn't change the field names.

Can't Use:
-"Add Join" because it changes all of the field names to append the name of the file it came from. (Ex.: "landuse.FieldA", "landuse.FieldB", "lookup_tab.FieldC", and "lookup_tab.FieldD".) The "Join Data" tool doesn't change the field names. I would have to find an automated way to change the field names back, stripping the file names off of the fields.
-"Join Field" because it takes *hours* to join the table (instead of just seconds with "Join Data" or "Add Join").

Does anyone know how to access the "Join Data" function in Python?

I've gotten several suggestions saying that I should just use "Add Join" and then change all of my field names, and several others saying that I should just manually right-click to use "Join Data", then run the script for the rest of the processing I need to do. I would rather use the best tool for the job.

Thanks!

Regards,

-T.

Outcomes