As the subject states, I'm trying to figure out the best way (if there is one) to publish a new feature layer to ArcGIS Online using Python.
The data is coming from an enterprise geodatabase. The feature class has attachments enabled and the attachments are a ton of photos from inspections.
I have the script working for publishing the feature layer with attachments. However, I don't need all of the attachments included for this scenario. When publishing the layer through ArcGIS Pro, I didn't see a setting anywhere that would allow me to not include the attachments.
The script is creating a 10GB service definition due to all of the photos. This is taking a significant amount of time to create, upload into ArcGIS Online, and then publish.
Any help you could provide would be greatly appreciated!
Solved! Go to Solution.
Might work to export a copy of the feature layer without attachments, and publish that?
Might work to export a copy of the feature layer without attachments, and publish that?
This looks promising. I'll use the arcpy.env.maintainAttachments = False in my script while exporting the features to a new feature class. I'll report back and mark it as a solution if I'm successful.
Thank you!
This will work for our use case! Thank you again for the response.