|
13 | 13 | "id": "a8fd2570-ff4b-4cec-9269-cbf542cd66af",
|
14 | 14 | "metadata": {},
|
15 | 15 | "source": [
|
16 |
| - "Version 2.4.1 of the ArcGIS API for Python brought about some exciting new functionality for content management: the `arcgis.apps.itemgraph` module. This module, in it's most basic usage, allows you to take an item in an organization and examine the deep dependencies of it- what items it needs to exist, what items those items need to exist, and so on. This is very helpful for management of apps and smaller subsets of org items, but what if we really want to push the limits of what we can do with this module?\n", |
| 16 | + "Version 2.4.1 of the ArcGIS API for Python brought about some exciting new functionality for content management: the [`arcgis.apps.itemgraph`](/python/latest/api-reference/arcgis.apps.itemgraph.html) module. This module, in it's most basic usage, allows you to take an item in an organization and examine the deep dependencies of it- what items it needs to exist, what items those items need to exist, and so on. This is very helpful for management of apps and smaller subsets of org items, but what if we really want to push the limits of what we can do with this module?\n", |
17 | 17 | "\n",
|
18 | 18 | "With a little patience and creativity, we can create an actively-updated dependency graph that encapsulates every item in our organization. Doing so opens up all sorts of doors for us, such as:\n",
|
19 | 19 | "- The ability to examine the total reverse dependencies of an item (e.g., take a feature layer- we can see every app or map in our org that requires it to exist, or that will be effected by a change to it\n",
|
|
54 | 54 | "\n",
|
55 | 55 | "This builds the initial dependency graph by indexing over every single item in the organization. This only needs to be run once, and will likely take a very long time, depending on how many items are in the org. Once it's been run and the graph structure and time stamp are saved into files, this notebook that updates the dependency graph can be run. This first cell can also be executed outside of ArcGIS Notebooks, and the .gml and .txt files can be brought in from elsewhere.\n",
|
56 | 56 | "\n",
|
57 |
| - "*Note: Comment out this cell after the first time running the notebook.*" |
| 57 | + "> **Note:** Comment out this cell after the first time running the notebook." |
58 | 58 | ]
|
59 | 59 | },
|
60 | 60 | {
|
|
91 | 91 | "source": [
|
92 | 92 | "### Efficiently Analyzing the Existent Graph\n",
|
93 | 93 | "\n",
|
94 |
| - "This workflow is predicated on preserving our graph offline in a [GML format file](https://networkx.org/documentation/stable/reference/readwrite/gml.html), which is a commonly used file type for storing graph structures. Our `write_to_file()` function generates a .gml file with both the basic graph structure and some additional metadata that informs our `load_from_file()` function how to grab a given item from a GIS organization.\n", |
| 94 | + "This workflow is predicated on preserving our graph offline in a [GML format file](https://networkx.org/documentation/stable/reference/readwrite/gml.html), which is a commonly used file type for storing graph structures. Our [`write_to_file()`](/python/latest/api-reference/arcgis.apps.itemgraph.html#arcgis.apps.itemgraph.ItemGraph.write_to_file) function generates a .gml file with both the basic graph structure and some additional metadata that informs our [`load_from_file()`](/python/latest/api-reference/arcgis.apps.itemgraph.html#arcgis.apps.itemgraph.load_from_file) function how to grab a given item from a GIS organization.\n", |
95 | 95 | "\n",
|
96 | 96 | "When loading up an existent graph based on a .gml file, it still may take some time to retrieve every single item associated with each node in the graph, especially for organizations with thousands and thousands of items. If you want to instantly analyze the items and relationships in a .gml file with thousands of records, we can call `load_to_file()` and elect to *not* retrieve each item. This still gives us the power to view all item id's and their dependencies in the org, but without the overhead of retrieving each one from a REST endpoint first. Users can simply retrieve the associated items as needed, based on the id's.\n",
|
97 | 97 | "\n",
|
|
803 | 803 | "id": "fd4c5d32-2f52-44d0-a59d-c5beaec43493",
|
804 | 804 | "metadata": {},
|
805 | 805 | "source": [
|
806 |
| - "Given this list of items with ID's that lead nowhere, we can grab the node for any one of them and do what we did above- see which org items contain or require them. From there, we can figure out how to fix it- one option is using the `remap_data()` function, documented [here](https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.remap_data)." |
| 806 | + "Given this list of items with ID's that lead nowhere, we can grab the node for any one of them and do what we did above- see which org items contain or require them. From there, we can figure out how to fix it- one option is using the `remap_data()` function, documented [here](/python/latest/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.remap_data)." |
807 | 807 | ]
|
808 | 808 | },
|
809 | 809 | {
|
|
1183 | 1183 | "source": [
|
1184 | 1184 | "Everything we've done in this notebook is purely informative- no changes, additions, or deletions to org items were done. All we've done is update and manipulate or ItemGraph in memory and written out to file. So what does this mean? \n",
|
1185 | 1185 | "\n",
|
1186 |
| - "This means that you can download this very notebook and run it for yourself. Keeping this notebook run on a consistent timeframe will provide you with an up-to-date graph to analyze your org items. ArcGIS Notebooks, in both ArcGIS Online and ArcGIS Enteprise, provide us with an easy way to schedule automation of notebooks. Let's take a look how.\n", |
| 1186 | + "This means that you can download this very notebook and run it for yourself. Keeping this notebook run on a consistent timeframe will provide you with an up-to-date graph to analyze your org items. ArcGIS Notebooks, in both ArcGIS Online and ArcGIS Enterprise, provide us with an easy way to schedule automation of notebooks. Let's take a look how.\n", |
1187 | 1187 | "\n",
|
1188 | 1188 | "### Scheduling a Task\n",
|
1189 | 1189 | "\n",
|
|
1259 | 1259 | "name": "python",
|
1260 | 1260 | "nbconvert_exporter": "python",
|
1261 | 1261 | "pygments_lexer": "ipython3",
|
1262 |
| - "version": "3.11.10" |
| 1262 | + "version": "3.13.2" |
1263 | 1263 | }
|
1264 | 1264 | },
|
1265 | 1265 | "nbformat": 4,
|
|
0 commit comments