Esri / data-assistant

ArcGIS Pro Add-in that assists in emergency management, local government and state government data aggregation workflows.
Apache License 2.0
22 stars 8 forks source link

GP tools do not work outside of Pro #86

Closed jessnoo closed 7 years ago

jessnoo commented 7 years ago

It seems that when a new mapping file is created using layers in a map item -- if that map item is changed or deleted, the mapping file no longer works.

What dependencies make sense for the mapping files?

jessnoo commented 7 years ago

Example --

the attached mapping file was created with layers in a map and all the tools executed successfully when the map existed. After i deleted the map item and tried to run the replace tool, even though the data sources still exist in the same locations - it fails

image

shp_fgdb.zip

Here's a screenshot of the previous successful run... image

it's possible this is related to #85

chris-fox commented 7 years ago

In addition, is there a need to be able to script this workflow outside of Pro to run it daily/weekly, etc.? If so you would need to be able to run outside the context of a 'Current' project.

image

ChrisBuscaglia commented 7 years ago

@chris-fox Yes - needs to run outside of ArcGIS Pro.

SteveGrise commented 7 years ago

Improved handling of layer source properties to ensure the layer path is usable between Pro sessions.

SteveGrise commented 7 years ago

Starting with Pro 1.3, my understanding for Enterprise geodatabases is that the layer.dataSource property will always return a string like "CIMWKSP=<CIMWorkspaceConnection ...". I cannot find the property like 'Database Connections\.sde\featureclass. As a result I am creating a new .sde connection file to use as the source in the data assistant. To complete this work I need 2 things:

  1. A confirmation that the dataSource property is working correctly and will stay this way.
  2. A lookup list for database types. For example the connectionProperties contains dbclient:"sqlserver", but the connection file requires database_platform:"SQL Server". I made an attempt to cover all supported database platforms but it's a guess at the values.
SteveGrise commented 7 years ago

Closed #63 but need to address issues in previous comments here and emails re: CIMWKSP.

SteveGrise commented 7 years ago

Will need further work if CIMWKSP= dataSource values are returned for SQL databases. If so, will need some help to complete a partial solution to that issue - which should be a new git issue.

jessnoo commented 7 years ago

Validated with fgdb > egdb and fgdb > feature service. Needs more testing, but with Sprint one, basic sanity is passing.

Test Cases:

  1. Create a mapping file using layers in a map, then delete the map and run Append and Replace
  2. Run Append and Replace tools in command window (outside of Pro application)

Potential gotcha is the licensing of the python process and if Organizational resources are being used --- in the case where the target is a hosted feature service that is NOT public, then the way the python process is started needs to be considered so that it has the proper credentials to access the service, etc. Recommend that this would be addressed in the documentation somehow.