I'm trying to publish a web layer to ArcGIS Online without any related data, however everything I've tried always packages up everything related and uploads to AGO.
I have a feature class that is used with Collector for field inspections so it has a relationship class with the _ATTACH table that holds images. Typical Collector setup. I'd like to publish just the main feature class to AGO as a web layer, however when Pro is done publishing, my AGO contains the hosted feature layer along with the Service Definition which is enormous as it seems to have packaged the images and everything with it. I will be doing periodic updates to the hosted feature service which seems to require that the Service Definition remain in My Content so I cant just delete it.
The hosted service which looks good:
The very large service definition:
My Pro project is just the feature class dragged in and symbolized. As you can see in the image below the Relates dropdown is empty and the Related Data button is grayed out?
Similarly the python code to update does the same thing.
arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, serviceName, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS', None, True, True)