POST
|
Hello Brian, You might find this useful... As part of our effort on the Living Atlas Team to create more Notebook specific content in online, we are starting to transfer existing Python scripts to Notebooks. But we quickly found that larger Python scripts can become a little unwieldy inside a Notebook. To combat this, we pull out a majority of our code and store it as Python Code Sample items in online. This allows us to manage the code using an IDE of choice, make changes, and then update the Code Sample item with the changes. All while keeping the Notebook as light as possible. Here’s where it gets interesting. Now that we have an online Python item, we can use a little Python logic in the Notebook to access the Code Sample, download it, and unzip the contents to the ‘/arcgis/home’ folder. Where it is managed and accessible across all of your Notebooks via the Kernel. The Notebook item below contains a Cell with two functions, one to manage the item contents in the home folder and another to remove it if you no longer need or want it. The manger can even update the imported module when it detects a change the next time you run the Notebook or trigger the manager. Basically, it maintains a local cached copy of the Python item content in your account file folders. You just tell it what Item Id to pull down and manage. Then, simply Import the module(s) as usual to get at the Classes, Functions, and properties you are accustom to. Best part about this technique, you can leverage any Python Code Sample that is accessible, enabling you to access reusable libraries and one off code alike. Sample Notebook titled 'Manage Notebook Code Dependencies': https://www.arcgis.com/home/item.html?id=46c7512604654601ab4338f9299c5414 Regards, Paul
... View more
06-29-2020
04:02 PM
|
3
|
0
|
1542
|
POST
|
Hello, Time aware services will report their time extents using the ‘returnUpdates’ endpoint, but you need to make sure the service includes the ‘hasLiveData’ property somewhere. For a Map Service, make sure the Time dialog on the Layer Properties for at least one Layer has the ‘data changes frequently so calculate time extent automatically’ check box is checked on. This sets the Layer ‘hasLiveData’ to true and will refresh the properties periodically. For other Services, you’ll want to leverage the ‘Refresh Service’ GP tool and set the service JSON properties to include the key value pair of "hasLiveData": "true". See: https://developers.arcgis.com/rest/services-reference/refreshservice.htm In most cases, the REST cache CAN be cleared to propagate the updated time details to the service following a data change by invoking the ‘Clear Rest Cache’ admin function. Simply specify the service folder, name, and type to flush the cache and force the service to update the properties: https://developers.arcgis.com/rest/enterprise-administration/server/handlersrestcacheclear.htm I hope this helps, Paul
... View more
04-24-2019
11:27 AM
|
0
|
0
|
1721
|
POST
|
Hey Joel, You can use 'Preconditions' to control Order of Operation: A quick tour of using preconditions—Help | ArcGIS for Desktop In the above example, process 2 cannot start until the Feature Dataset has been created by process 1. I've used this to control dependant field calculations, where the value of one calculated field is used to calc another field. This is very simple to setup and does not require you to alter the workflow or logic of your existing process.
... View more
11-26-2018
08:54 AM
|
1
|
0
|
8925
|
Title | Kudos | Posted |
---|---|---|
1 | 11-26-2018 08:54 AM | |
3 | 06-29-2020 04:02 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|