<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: UpdateCursor With a Hosted Table in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781008#M1201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked. Thanks a lot. The script worked until it ran into a KeyError. I think that may have to do with the fact that the 'Compost Facilities/Landscape Waste Transfer Stations' field is NULL. I'll fix that and try again. In the meantime i'll mark your answer correct!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;
KeyError                                  Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;ipython&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;input&lt;SPAN class="number token"&gt;-32&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9dbca838b891&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;23&lt;/SPAN&gt;     &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;24&lt;/SPAN&gt;         &lt;SPAN class="comment token"&gt;# for each feature, looks up description from the description_dict, using the category as the key&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;25&lt;/SPAN&gt;         row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; description_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;26&lt;/SPAN&gt;         cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

KeyError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Compost Facilities/Landscape Waste Transfer Stations'&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:49:32 GMT</pubDate>
    <dc:creator>JaredPilbeam2</dc:creator>
    <dc:date>2021-12-12T08:49:32Z</dc:date>
    <item>
      <title>UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781002#M1195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to populate the 'Description' field in the Recycling Locations View layer (a hosted Feature Layer) with the text from the 'Description' field in the Green Descriptions layer (a hosted Table). The 'Category' field from both have the same values. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/499525_des.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-3 j-img-original" src="https://community.esri.com/legacyfs/online/499529_des2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script I have uses the UpdateCursor to populate a field based on another field from the same Feature Layer. I think I can create a list with the text from the 'Description' field, but that seems redundant seeing as though there is probably a way to bring it in straight from the hosted table?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; json

&lt;SPAN class="comment token"&gt;#disable warnings&lt;/SPAN&gt;
requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;packages&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;urllib3&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;disable_warnings&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#Recycling Locations Feature layer&lt;/SPAN&gt;
fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; survey_item

&lt;SPAN class="comment token"&gt;#text to populate the Description field of the Recycling Locations layer&lt;/SPAN&gt;
descriptions &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;'Refrigerators&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; stoves&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dishwashers&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; water heaters &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; other large appliances are considered white goods &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; are banned &lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; landfills&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Hazardous components such &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; mercury&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; CFCs &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; PCBs are dangerous &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; require proper handling &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; disposal&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; When purchasing an appliance&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; request the company to take your “old” appliance &lt;SPAN class="operator token"&gt;or&lt;/SPAN&gt; contact your city&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;village&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; A list of certified Freon removal specialists &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; currently available&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; The U&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;S&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; EPA administers a program to certify technicans&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; Their requirements can be found at http&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt;www&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;epa&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gov&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;Ozone&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;title6&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;608&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;608fact&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;html&lt;SPAN class="comment token"&gt;#techcert',&lt;/SPAN&gt;
               &lt;SPAN class="string token"&gt;'ASBESTOS - Asbestos is a naturally occurring mineral found in certain rocks. Asbestos was commonly used in home building materials before the mid-1970s and occasionally until the late 1980s because it is strong, fire- and corrosion-resistant and a good insulator. If asbestos is in good condition and left in place, it should not present health risks. However, if a building is going to be demolished, renovated, or remodeled, care should be taken to prevent the release of asbestos fibers into the air. Inhalation of microscopic asbestos fibers can cause health risks. You may search for Licensed Asbestos Professionals in the Yellow Pages or call the Illinois Dept. of Public Health.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
               &lt;SPAN class="string token"&gt;'In most cases older vehicles are traded-in or brought to an auto salvage yard; or you may choose to donate them for parts reuse and recycling. Contact the following organizations to make arrangements, get paid or ask about tax deduction information.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
               &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; etc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
               &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#fields from the Recycling Locations layer&lt;/SPAN&gt;
fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Description'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Category'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#use the updatecursor to populate the Description field from the descriptions list&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
     &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
         &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Appliance Recycling'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; descriptions&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
         &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Asbestos Info / Removal Service'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; descriptions&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
         &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Automobile &amp;amp; Boat Reuse Recycling'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; descriptions&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
         cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; cursor‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:49:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781002#M1195</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-12-12T08:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781003#M1196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is going to be a one-off operation you might want to consider just adding both layer to a map in ArcGIS Pro, joining the &lt;SPAN style="background-color: #ffffff;"&gt;Green Descriptions table to the &lt;SPAN style="background-color: #ffffff;"&gt;Recycling Locations View layer on "Category"&lt;/SPAN&gt;&lt;SPAN&gt;, then just using the field calculator to copy the description field from the joined table to the feature layer.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;If you do need to run it frequently, and you want to be able to automate this let me know. As far as I understand from the cursor documentation you can't&amp;nbsp;run a cursor over a web service, but there is an analogous workflow using the ArcGIS API for Python, and I could probably dig up a script you could adapt to your needs.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 15:22:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781003#M1196</guid>
      <dc:creator>JoshuaSharp-Heward</dc:creator>
      <dc:date>2020-07-08T15:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781004#M1197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try the join and then the field calculator in Pro before this, and for some reason it didn't work. Now I tried again and it did work! Thanks for the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It now seems like overkill to go the automation route, but yes, I am still curious how it can be done. I know you can use a cursor on a feature service using the Python API, as I have used that very script (above) before. That's why I'm posting in this group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 16:00:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781004#M1197</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2020-07-08T16:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781005#M1198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jared,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to hear that worked out! Just to clarify here, Arcpy and the ArcGIS API for Python are two separate things. The script you posted above is using the Arcpy python package, whereas the ArcGIS API for Python is imported using&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and is used for automating things in AGOL/Portal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if I'm understanding correctly you want to take the categories and descriptions straight from the table web service, then use that in your update cursor? If so, see the code below for an example of this, running over the table first to make a dictionary of category:description pairs, then updating the features with those values. Also I stand corrected about the cursors running over services.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; requests&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; json

&lt;SPAN class="comment token"&gt;# disable warnings&lt;/SPAN&gt;
requests&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;packages&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;urllib3&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;disable_warnings&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Recycling Locations Feature layer&lt;/SPAN&gt;
fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; survey_item
table &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; table_url

&lt;SPAN class="comment token"&gt;# fields from the Recycling Locations layer and Green Description&lt;/SPAN&gt;
fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Description'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Category'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# make a dictionary of the categories and descriptions&lt;/SPAN&gt;
description_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;table&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        description_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;# makes a structure like {"Appliance Recycling": "blahblahblah"}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# use the updatecursor to populate the Description field from the descriptions list&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;# for each feature, looks up description from the description_dict, using the category as the key&lt;/SPAN&gt;
        row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; description_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
        cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:49:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781005#M1198</guid>
      <dc:creator>JoshuaSharp-Heward</dc:creator>
      <dc:date>2021-12-12T08:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781006#M1199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That looks like exactly what I was thinking. Making a dictionary of the categories and descriptions and then using the category as the key was 'key'. I ran into a little problem, though, that I'm currently looking into. The SearchCursor is not accepting the in_table parameter. What I thought was a table is actually a 'Feature Layer Collection', which is what is causing the error I believe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Overview of Green Descriptions Table (created from a CSV).&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="499615" alt="" class="jive-emoji jive-image image-3 j-img-original" src="https://community.esri.com/legacyfs/online/499615_tabe.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jupyter Notebook calls the Table a 'Feature Layer Collection' I found out.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="499613" alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/499613_tabe3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script with error.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="499609" alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/499609_tabe4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I started a new thread about this: &lt;A href="https://community.esri.com/thread/256307"&gt;'in_table' is not a table or a featureclass&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 19:40:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781006#M1199</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2020-07-08T19:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781007#M1200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jared,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try passing the&amp;nbsp;table's rest url&amp;nbsp;into the table parameter, instead of the item. It should look something like "&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;https://&lt;/SPAN&gt;&lt;A class="" href="https://developers.arcgis.com/rest/services-reference/catalog.htm" style="color: #0079c1; background-color: #f8f8f8; text-decoration: none;"&gt;&amp;lt;catalog-url&amp;gt;&lt;/A&gt;&lt;SPAN style="color: #4c4c4c; background-color: #f8f8f8;"&gt;/&amp;lt;serviceName&amp;gt;/FeatureServer/0" with 0 indicating the index of the layer (if there's only one layer in the service, it will be 0).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 20:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781007#M1200</guid>
      <dc:creator>JoshuaSharp-Heward</dc:creator>
      <dc:date>2020-07-08T20:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781008#M1201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked. Thanks a lot. The script worked until it ran into a KeyError. I think that may have to do with the fact that the 'Compost Facilities/Landscape Waste Transfer Stations' field is NULL. I'll fix that and try again. In the meantime i'll mark your answer correct!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;
KeyError                                  Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;ipython&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;input&lt;SPAN class="number token"&gt;-32&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9dbca838b891&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;23&lt;/SPAN&gt;     &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;24&lt;/SPAN&gt;         &lt;SPAN class="comment token"&gt;# for each feature, looks up description from the description_dict, using the category as the key&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;25&lt;/SPAN&gt;         row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; description_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
     &lt;SPAN class="number token"&gt;26&lt;/SPAN&gt;         cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

KeyError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Compost Facilities/Landscape Waste Transfer Stations'&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:49:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781008#M1201</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2021-12-12T08:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor With a Hosted Table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781009#M1202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Parfait! I should have added an if statement to check whether that category is in the dictionary anyway, see line 3 below.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; description_dict&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; description_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
            cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then it should just skip over those values!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:49:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/updatecursor-with-a-hosted-table/m-p/781009#M1202</guid>
      <dc:creator>JoshuaSharp-Heward</dc:creator>
      <dc:date>2021-12-12T08:49:35Z</dc:date>
    </item>
  </channel>
</rss>

