I am using python for geoprocessing and am interacting with layers in a Portal Web Map, using the WAB geoprocessing widget in a web application. It works OK but I am concerned about the actual data I am using in the geoprocessing widget.
In order to publish to Portal, I first I run the python script from a toolbox in ArcMap. Then I publish the result of running the script tool as a geoprocessing service in Portal. For my data sources in ArcMap I bring in the hosted feature layers from Portal, which of course are located in the managed database.
However when I publish the geoprocessing service it always warns me that the layers I am using for input for geoprocessing will be uploaded to the server. The only way that they are not uploaded is when I use data sources either in a registered folder or database.
The point is that I do not want to have two data sources: one which is the Portal map using hosted feature layers in the managed database and another set of data either uploaded to ArcGIS Server or located in a registered folder or database. It means that it will look like my geoprocessing service is interrogating that hosted feature layers in the map but in fact it is, for example, using feature classes in a registered File geodatabase. What if the data in the web map and those in the File geodatabase get out of sync?
So in short, my question is how to have a geoprocessing service that truly interacts with the data people see in the web map i.e the hosted feature layers. Is there any way to make the managed data store also a registered data store in order to achieve this? I looked in ArcGIS for Server but there seems to be no button or anything to make the managed database also a registered data source.