Here is my problem, I have a MySQL database with table in it that has 4 columns: ID, Owner, Address, Legal. And I also have an ArcGIS GDB that has a parcel layer that has in it a PID field. I am looking for a way to join this MySQL table and the ArcGIS GDB into a new GDB with all of the information from both in Python using arcpy. The PID field and the ID field match up, I am just not finding a way to to a join between a MySQL table and the GDB. Any help would be appreciated.
1 Answer
If you're using 10.1 you'll need to add the "Add OLE DB Connection" button to Catalog. With that tool you can connect to your MySQL DB directly, or through ODBC. Once you use it to create a connection you can use that in your ArcMap MXD or ArcPY script to join to your GDB. Here's the manual on the ArcPY syntax for joins:
-
It is actually in 10.0, will this still work, or will it need some other steps?– archerneNov 29, 2012 at 19:19
-
Yes, but I think the Add OLE DB button is still on the default interface. The ArcPy syntax is the same. Nov 29, 2012 at 19:19
-
I was trying to do it without the extra step. This does accomplish my task, but also means that I now have to make 50+ OLE DB connections. Since This was small scale (One object) and I now have to scale it for 50+ objects– archerneNov 29, 2012 at 22:44