Edit a Query Layer with Arcpy
Unfortunately, there is no way to edit the query table after it was created in ArcMap using arcpy
. You will need to use ArcObjects either using .NET/Java/C++ or using comtypes
in Python to work the COM interfaces.
You have a couple of options:
Use a regular feature layer and set its definition query using
Layer
object usingarcpy
.Create a database view using SQL tools or ArcGIS
Create Database View
GP tool and then modify its definition as needed.