Moving published python tool to ArcPro - Database Connections question

356
1
Jump to solution
11-01-2019 09:12 AM
DonMorrison1
Occasional Contributor III

I have a python tool that we are moving from ArcMap to ArcPro.  The tool accesses our enterprise database. In my python code I can reference the database using a string like 'Database Connections\\ROW Habitat (SDE).sde\\ROW_Habitat.SDE.Site'. When I do the publish ArcGIS is smart enough to figure out where the database really resides on the server (which I don't have access to)

This doesn't work on ArcPro. There appears to be no equivalent to "Database Connections".   I suspect that if I hard-code the absolute path to the sde file on my client, that the publish step would see that string and copy the sde file up to the server and figure it out from there. But we have a scheme where the absolute path is fed in from a properties file. This allows us to deploy the tool into multiple environments controlled by a local properties file. 

Any suggestions on how to get this type of publish to work on ArcPro?

0 Kudos
1 Solution

Accepted Solutions
DonMorrison1
Occasional Contributor III

I'm going to close this out. I was able to get this to work by putting the full database path in a local property file imported by the python tool code - but the file had to be in the same directory structure as the python toolbox. Assuming the database is registered (mine wasn't) then the publish step will copy only the .SDE file up to the server.

View solution in original post

0 Kudos
1 Reply
DonMorrison1
Occasional Contributor III

I'm going to close this out. I was able to get this to work by putting the full database path in a local property file imported by the python tool code - but the file had to be in the same directory structure as the python toolbox. Assuming the database is registered (mine wasn't) then the publish step will copy only the .SDE file up to the server.

0 Kudos