Make a table from MySQL query with ArcPy

المشرف العام

Administrator
طاقم الإدارة
I am trying interact directly with data from a MySQL database in ArcMap using Python. So far, I have successfully connected the database using the MySQLdb.connect() function and have successfully executed queries using the cur.execute() function. I also am able to print the results in the Python window.

I cannot, however, figure out how to create a table from the query output that I can then use to, for instance, join to a shapefile or display XY data. I assumed that the MakeQueryTable_management() function would allow me to do this, but the syntax is very confusing to me. Do I execute the query using cur.execute() and then execute this function, does this function replace the cur.execute() function, or do I do something altogether different?

I am new to ArcPy and any help would be appreciated. Thank you!



أكثر...
 
أعلى