I've a geoprocessing (created with Arcmap 10.5) which basically connect to a datasource, extract data with a cursor and return it as JSON.
At development step I setup my source as following:
SdeObject = "Database Connections\\xy_source.sde\\xy_database.xy_schema.xy_table"
It works because, as far as I understand, the String "Database Connections" is a shortcut for my catalaog.
Then I publish my geoprocessing as a Geoprocessing Service on a Arcgis Enterprise federated server (v10.7). It publishs without error, but when I execute my job I got the following error without many surprise.
Error executing tool. Tool Job ID: jdf738x90a0b14793ac47ce44cd99a0df : Traceback (most recent call last): File "<string>", line 127, in execute File "<string>", line 38, in run File "q:\esri\server\arcpy\arcpy\management.py", line 6986, in MakeFeatureLayer raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Features: Dataset Database Connections\xy_source.sde\xy_database.xy_schema.xy_table does not exist or is not supported Failed to execute (MakeFeatureLayer). Failed to execute (Tool). Failed to execute (Tool).
The xy_database is already configured as datastore on my AGS with the same user, but I guess it is not accessible from "Database Connections" alias...
So, what is the recommanded way to publish a geoprocessing, in order to use AGS's already configured datastore?