Skip to content

Commit 5ba8065

Browse files
committed
Update parcel fabric tutorials
Using new enterprise connection
1 parent 3582840 commit 5ba8065

File tree

5 files changed

+119
-92
lines changed

5 files changed

+119
-92
lines changed

guide/04-feature-data-and-analysis/part1_parcel_fabric_an_introduction.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
{
6262
"cell_type": "code",
63-
"execution_count": 3,
63+
"execution_count": 2,
6464
"metadata": {},
6565
"outputs": [
6666
{
@@ -78,7 +78,7 @@
7878
" 'https://rextapilnx02eb.esri.com/server/rest/services/WashingtonCounty/VersionManagementServer']"
7979
]
8080
},
81-
"execution_count": 3,
81+
"execution_count": 2,
8282
"metadata": {},
8383
"output_type": "execute_result"
8484
}
@@ -89,7 +89,7 @@
8989
")\n",
9090
"gis = GIS(\n",
9191
" \"https://rextapilnx02eb.esri.com/portal/\",\n",
92-
" \"creator2\",\n",
92+
" \"gisproadv2\",\n",
9393
" \"portalaccount1\",\n",
9494
" verify_cert=False,\n",
9595
")\n",
@@ -112,7 +112,7 @@
112112
},
113113
{
114114
"cell_type": "code",
115-
"execution_count": 4,
115+
"execution_count": 3,
116116
"metadata": {},
117117
"outputs": [
118118
{
@@ -121,7 +121,7 @@
121121
"'Query,Create,Update,Delete,Uploads,Editing,Sync,ChangeTracking'"
122122
]
123123
},
124-
"execution_count": 4,
124+
"execution_count": 3,
125125
"metadata": {},
126126
"output_type": "execute_result"
127127
}
@@ -140,7 +140,7 @@
140140
},
141141
{
142142
"cell_type": "code",
143-
"execution_count": 5,
143+
"execution_count": 4,
144144
"metadata": {},
145145
"outputs": [
146146
{
@@ -169,7 +169,7 @@
169169
" 'Layer ID: 27 - Name: Validation Polygon Errors']"
170170
]
171171
},
172-
"execution_count": 5,
172+
"execution_count": 4,
173173
"metadata": {},
174174
"output_type": "execute_result"
175175
}
@@ -195,7 +195,7 @@
195195
},
196196
{
197197
"cell_type": "code",
198-
"execution_count": 6,
198+
"execution_count": 5,
199199
"metadata": {},
200200
"outputs": [
201201
{
@@ -208,7 +208,7 @@
208208
"}"
209209
]
210210
},
211-
"execution_count": 6,
211+
"execution_count": 5,
212212
"metadata": {},
213213
"output_type": "execute_result"
214214
}
@@ -236,7 +236,7 @@
236236
},
237237
{
238238
"cell_type": "code",
239-
"execution_count": 7,
239+
"execution_count": 6,
240240
"metadata": {},
241241
"outputs": [
242242
{
@@ -263,7 +263,7 @@
263263
" 'update_history']"
264264
]
265265
},
266-
"execution_count": 7,
266+
"execution_count": 6,
267267
"metadata": {},
268268
"output_type": "execute_result"
269269
}

guide/04-feature-data-and-analysis/part2_branch_versioning_with_parcel_fabrics.ipynb

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "code",
53-
"execution_count": 1,
53+
"execution_count": 3,
5454
"id": "3b5328c1",
5555
"metadata": {},
5656
"outputs": [],
@@ -61,7 +61,7 @@
6161
},
6262
{
6363
"cell_type": "code",
64-
"execution_count": 2,
64+
"execution_count": 5,
6565
"id": "abdf9cc2",
6666
"metadata": {},
6767
"outputs": [
@@ -79,7 +79,7 @@
7979
")\n",
8080
"gis = GIS(\n",
8181
" \"https://rextapilnx02eb.esri.com/portal/\",\n",
82-
" \"creator2\",\n",
82+
" \"gisproadv2\",\n",
8383
" \"portalaccount1\",\n",
8484
" verify_cert=False,\n",
8585
")"
@@ -95,7 +95,7 @@
9595
},
9696
{
9797
"cell_type": "code",
98-
"execution_count": 3,
98+
"execution_count": 11,
9999
"id": "bf7b899c",
100100
"metadata": {},
101101
"outputs": [
@@ -120,7 +120,7 @@
120120
"}"
121121
]
122122
},
123-
"execution_count": 3,
123+
"execution_count": 11,
124124
"metadata": {},
125125
"output_type": "execute_result"
126126
}
@@ -143,18 +143,18 @@
143143
},
144144
{
145145
"cell_type": "code",
146-
"execution_count": 6,
146+
"execution_count": 12,
147147
"id": "31fcaff3",
148148
"metadata": {},
149149
"outputs": [
150150
{
151151
"data": {
152152
"text/plain": [
153153
"[<Version sde.DEFAULT @ {BD3F4817-9A00-41AC-B0CC-58F78DBAE0A1}>,\n",
154-
" <Version creator2.fabric_editor_1 @ {FA997604-DBC5-4EF1-A23D-DCD25E7D2537}>]"
154+
" <Version creator2.merge_version_1 @ {D1FDA18B-7B15-4773-9D7D-814092D88171}>]"
155155
]
156156
},
157-
"execution_count": 6,
157+
"execution_count": 12,
158158
"metadata": {},
159159
"output_type": "execute_result"
160160
}
@@ -169,40 +169,53 @@
169169
"id": "4087da88",
170170
"metadata": {},
171171
"source": [
172-
"#### Create a version"
172+
"#### Create a version\n",
173+
"\n",
174+
"The `create` method returns the properties of the new version. Use this info to get the fully qualified version name `owner.version_name`"
173175
]
174176
},
175177
{
176178
"cell_type": "code",
177-
"execution_count": 5,
179+
"execution_count": 13,
178180
"id": "c0933203",
179181
"metadata": {},
180182
"outputs": [
183+
{
184+
"name": "stdout",
185+
"output_type": "stream",
186+
"text": [
187+
"gisproadv2.fabric_editor_1\n"
188+
]
189+
},
181190
{
182191
"data": {
183192
"text/plain": [
184-
"{'versionInfo': {'versionName': 'creator2.fabric_editor_1',\n",
185-
" 'versionGuid': '{FA997604-DBC5-4EF1-A23D-DCD25E7D2537}',\n",
186-
" 'versionId': 1,\n",
193+
"{'versionInfo': {'versionName': 'gisproadv2.fabric_editor_1',\n",
194+
" 'versionGuid': '{EF1752A9-DF21-4D9B-819D-55F3D56BCE80}',\n",
195+
" 'versionId': 16,\n",
187196
" 'description': '',\n",
188-
" 'creationDate': 1685556072802,\n",
189-
" 'modifiedDate': 1685556072802,\n",
197+
" 'creationDate': 1685640955750,\n",
198+
" 'modifiedDate': 1685640955750,\n",
190199
" 'reconcileDate': None,\n",
191200
" 'evaluationDate': None,\n",
192201
" 'previousAncestorDate': None,\n",
193-
" 'commonAncestorDate': 1685556072802,\n",
202+
" 'commonAncestorDate': 1685640955750,\n",
194203
" 'access': 'public'},\n",
195204
" 'success': True}"
196205
]
197206
},
198-
"execution_count": 5,
207+
"execution_count": 13,
199208
"metadata": {},
200209
"output_type": "execute_result"
201210
}
202211
],
203212
"source": [
204213
"new_version_name = \"fabric_editor_1\"\n",
205-
"vms.create(new_version_name)"
214+
"version = vms.create(new_version_name)\n",
215+
"fq_version_name = version[\"versionInfo\"][\"versionName\"]\n",
216+
"print(fq_version_name)\n",
217+
"\n",
218+
"version # view the version's properties"
206219
]
207220
},
208221
{
@@ -219,17 +232,17 @@
219232
},
220233
{
221234
"cell_type": "code",
222-
"execution_count": 7,
235+
"execution_count": 14,
223236
"id": "e77b0221",
224237
"metadata": {},
225238
"outputs": [
226239
{
227240
"data": {
228241
"text/plain": [
229-
"['sde.DEFAULT', 'creator2.fabric_editor_1']"
242+
"['sde.DEFAULT', 'gisproadv2.fabric_editor_1', 'creator2.merge_version_1']"
230243
]
231244
},
232-
"execution_count": 7,
245+
"execution_count": 14,
233246
"metadata": {},
234247
"output_type": "execute_result"
235248
}
@@ -259,7 +272,7 @@
259272
},
260273
{
261274
"cell_type": "code",
262-
"execution_count": 9,
275+
"execution_count": 16,
263276
"id": "1996f509",
264277
"metadata": {},
265278
"outputs": [
@@ -273,7 +286,7 @@
273286
"}"
274287
]
275288
},
276-
"execution_count": 9,
289+
"execution_count": 16,
277290
"metadata": {},
278291
"output_type": "execute_result"
279292
}
@@ -285,7 +298,7 @@
285298
"\n",
286299
"# start a 'read' session to acquire a shared lock and\n",
287300
"# get a branch version by its name\n",
288-
"with vms.get(\"creator2.fabric_editor_1\", \"read\") as version:\n",
301+
"with vms.get(fq_version_name, \"read\") as version:\n",
289302
" parcel_fabric_manager = _parcel.ParcelFabricManager(\n",
290303
" parcel_fabric_manager_url, gis, version, parcel_fabric_flc\n",
291304
" )\n",
@@ -308,24 +321,23 @@
308321
},
309322
{
310323
"cell_type": "code",
311-
"execution_count": 13,
324+
"execution_count": 17,
312325
"id": "d72d539a",
313326
"metadata": {},
314327
"outputs": [
315328
{
316-
"ename": "AttributeError",
317-
"evalue": "'NoneType' object has no attribute 'delete'",
318-
"output_type": "error",
319-
"traceback": [
320-
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
321-
"\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)",
322-
"\u001b[1;32m~\\AppData\\Local\\Temp\\1\\ipykernel_23396\\1638366743.py\u001b[0m in \u001b[0;36m<cell line: 6>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m# version.post\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 6\u001b[1;33m \u001b[0mversion\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdelete\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
323-
"\u001b[1;31mAttributeError\u001b[0m: 'NoneType' object has no attribute 'delete'"
324-
]
329+
"data": {
330+
"text/plain": [
331+
"True"
332+
]
333+
},
334+
"execution_count": 17,
335+
"metadata": {},
336+
"output_type": "execute_result"
325337
}
326338
],
327339
"source": [
328-
"version = vms.get(f\"creator2.{new_version_name}\")\n",
340+
"version = vms.get(fq_version_name)\n",
329341
"\n",
330342
"# version.reconcile()\n",
331343
"# version.post\n",
@@ -364,7 +376,7 @@
364376
"name": "python",
365377
"nbconvert_exporter": "python",
366378
"pygments_lexer": "ipython3",
367-
"version": "3.9.11"
379+
"version": "3.9.16"
368380
},
369381
"toc": {
370382
"base_numbering": 1,

0 commit comments

Comments
 (0)