<?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: Migrating to GlobalID Relationship in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426011#M24397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote the update script Lynn refers to above.&amp;nbsp; It actually uses a python dictionary as a 'look up' table to populate the empty GUID.&amp;nbsp;&amp;nbsp;I think you'll need to first add the global ids to your fire hydrants, and then you could could cursor through the hydrant feature class and grab the Hydrant ID and the respective GlobalID into a dictionary.&amp;nbsp; I use a procedure that &lt;A href="https://community.esri.com/migrated-users/4811"&gt;Richard Fairhurst&lt;/A&gt;&amp;nbsp;came up with and discusses in&amp;nbsp;&lt;A href="https://community.esri.com/blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries"&gt;/blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Feb 2019 20:14:35 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2019-02-05T20:14:35Z</dc:date>
    <item>
      <title>Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426009#M24395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do something and never thought I would get stuck at the relationship creation level.&lt;/P&gt;&lt;P&gt;We've been collecting data with Survey 123 for the past two years (Hydrant Inspection). We now want to "automate" the process so that these inspections gets automatically attached to the corresponding hydrant. My common ID is called FHID (Fire Hydrant ID) in my "survey" table and in the my Fire Hydrant Feature Class. I created a relationship class using FHID as the Primary Key. Once this is complete, I need to convert the relationship to GlobalID so I can create my future surveys based on a feature service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing to relate already collected data and making the Global ID Relationship so I can survey on top of this survey table in the future?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 18:39:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426009#M24395</guid>
      <dc:creator>KevinRobert1</dc:creator>
      <dc:date>2019-02-05T18:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426010#M24396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;We had a similar issue while developing a series of surveys to populate related data tables with water quality data collected at stream SampleSites (points). Our relationship classes were originally based on the&amp;nbsp;sample site location&amp;nbsp;SITEID. Somewhere along the way (while developing the surveys) text fields were no longer allowed to be used for the relationships. Which was kind of a bummer, because that SITEID is meaningful as the primary key.&amp;nbsp; At any rate,&amp;nbsp;we added a new guid field to the sample sites (points) called SITE_GUID, and that is what the relationship classes are now built on.&amp;nbsp;We also added a SITE_GUID field to each data table.&amp;nbsp; When surveys are submitted the SITE_GUID is not populated (it's not generated by the survey). Rather, our workaround is an &lt;EM&gt;UpdateSiteGuid&lt;/EM&gt;&amp;nbsp;python script (runs nightly) which populates&amp;nbsp;the SITE_GUIDs in the related tables based on SITEID in SampleSites point file. Essentially, the sample site points have two primary keys, SITEID and SITE_GUID. It's a little clunky, but it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you haven't already&amp;nbsp;seen it, this post is a must read&amp;nbsp;&lt;A href="https://community.esri.com/groups/survey123/blog/2017/09/25/working-with-existing-feature-services-in-survey123-for-arcgis"&gt;https://community.esri.com/groups/survey123/blog/2017/09/25/working-with-existing-feature-services-in-survey123-for-arcgis&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this answers your question!&lt;/P&gt;&lt;P&gt;Lynn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 19:33:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426010#M24396</guid>
      <dc:creator>LynnBerni</dc:creator>
      <dc:date>2019-02-05T19:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426011#M24397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote the update script Lynn refers to above.&amp;nbsp; It actually uses a python dictionary as a 'look up' table to populate the empty GUID.&amp;nbsp;&amp;nbsp;I think you'll need to first add the global ids to your fire hydrants, and then you could could cursor through the hydrant feature class and grab the Hydrant ID and the respective GlobalID into a dictionary.&amp;nbsp; I use a procedure that &lt;A href="https://community.esri.com/migrated-users/4811"&gt;Richard Fairhurst&lt;/A&gt;&amp;nbsp;came up with and discusses in&amp;nbsp;&lt;A href="https://community.esri.com/blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries"&gt;/blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 20:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426011#M24397</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-02-05T20:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426012#M24398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your feedback Lynn / Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My initial thought was to create that GUID relationship and go from there but reading your comments made me realize that field workers will keep selecting the HydrantID while surveying, so it really looks like what you did is exactly what I am trying to achieve. I am just starting to use Python scripts and let's say that programming is pet peeve. Joe, in @Richard Fairhurst article, there are multiple sections, which of these script should I start with?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help!&lt;/P&gt;&lt;P&gt;I really appreciate it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2019 14:46:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426012#M24398</guid>
      <dc:creator>KevinRobert1</dc:creator>
      <dc:date>2019-02-07T14:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426013#M24399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Focus on example 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, Site_ID = Hydrant_ID.&amp;nbsp; I update a number of tables in a loop, so you can avoid that part...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# use a dictionary to populate a field&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; smtplib&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inspect&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os



arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'X:\path\to\your\data_source'&lt;/SPAN&gt;
ws &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace
tableList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Table1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Table2'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Table3'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
tableFields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SITEID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SITE_GUID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
source &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;\table\&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt;\siteid\site_guid\records&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ws&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#create a dirctionary of the {SITEID:SITE_GUID} from source...&lt;/SPAN&gt;
guidDict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;r&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="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&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="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; r &lt;SPAN class="keyword token"&gt;in&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;source&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;tableFields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# guidDict is in the form of:&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##    {'BC_00.61': ('{94ACB91D-34DD-40F6-802D-AC092339FD5E}',),&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##     'BC_01.94': ('{17A6C9CF-6FC0-4FE1-8AB7-EACBE0DB678F}',),&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##     'BC_03.73': ('{B39873DF-1F5A-4AFC-978F-5BD3888CB5D9}',),&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##     'BC_04.73': ('{FEE14B1D-7ED4-4D3C-9929-E1AC054F1022}',),&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##     'BC_08.83': ('{05627197-5125-43E7-8402-CBF39FE6197C}',),&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##     'BC_10.64': ('{A5C5EEA1-7308-4624-B193-F68761BCBF5A}',),&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##     .......&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##    'JR_09.79': ('{7EFEDE87-FD49-4020-9CFC-02D41D5B538C}',)}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#start an edit session  on non-versioned egdb&lt;/SPAN&gt;
edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Editor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ws&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#use False False: with undo,(False) multiuser mode(False)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#step through the tables and update&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#if the record has a valid site-id and a null site_guid&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#update the site_guid Both of these come from source feature class or table&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; t &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; tableList&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        updateTable &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'{}\{}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ws&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;t&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        updateFields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SITEID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SITE_GUID'&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;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;updateTable&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;updateFields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; updateRows&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; updateRow &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; updateRows&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
               keyValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; updateRow&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;if&lt;/SPAN&gt; keyValue &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; guidDict &lt;SPAN class="operator token"&gt;and&lt;/SPAN&gt; updateRow&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; None&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                   updateRow&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; guidDict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;keyValue&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&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;
                   updateRows&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
               &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                    &lt;SPAN class="keyword token"&gt;pass&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; err&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; err‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&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;/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>Sat, 11 Dec 2021 19:11:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426013#M24399</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T19:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426014#M24400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm debugging the script and at the "source" table defining part, I get an error message saying that the&amp;nbsp;'in_table' is not a table or a featureclass...&lt;/P&gt;&lt;P&gt;My table is a feature class inside a GDB (for testing for now), and I've defined it in the workspace at the begining...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# use a dictionary to populate a field&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; smtplib&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inspect&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"Y:\Working\TravauxPublics\Branch_Line_Flushing\Script\Hydrants.gdb"&lt;/SPAN&gt;
ws &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace
tableList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Hydrants_1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Hydrants_Branchline_Survey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
tableFields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"FHID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"GlobalID_1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
source &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Hydrants_1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#create a dictionary of the {SITEID:SITE_GUID} from source...&lt;/SPAN&gt;
guidDict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;r&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="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&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="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; r &lt;SPAN class="keyword token"&gt;in&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;source&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;tableFields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426014#M24400</guid>
      <dc:creator>KevinRobert1</dc:creator>
      <dc:date>2021-12-11T19:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426015#M24401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take the curly brackets in line #8. If I gave them to you, my bad!&amp;nbsp; Also, not sure why 'Hydrants_1' is part of your table list.&amp;nbsp; Table list should be the table(s) you are updating.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2019 14:54:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/426015#M24401</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-02-08T14:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Migrating to GlobalID Relationship</title>
      <link>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/1304895#M44609</link>
      <description>&lt;P&gt;I got this to work once to populate a Survey_Loc_ID field using GUID.&amp;nbsp; &amp;nbsp;However now I am trying to rebuild the relationship using the Global ID from a parent point layer for the survey locations.&amp;nbsp; It's not working. Any tips?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy, time, smtplib, sys, inspect, os
arcpy.env.workspace = r'\\enterprise_gdb.sde'
ws = arcpy.env.workspace
tableList = ['DNREC_OWNER.ENV_ConservationTillage_Visits_v3']
tableFields = ['SURVEY_LOC_ID','GLOBALID']
source = 'DNREC_OWNER.ENV_ConservationTillage_v3'
GlobalID_dict = {r[0]:(r[1]) for r in arcpy.da.SearchCursor(source,tableFields)}
edit = arcpy.da.Editor(ws)
edit.startEditing(False,False) #use False False: with undo,(False) multiuser mode(False)
edit.startOperation()
for t in tableList:
    try:
        updateTable = '{}\{}'.format(ws,t)
        updateFields = ['SURVEY_LOC_ID','GLOBALID']
    
        with arcpy.da.UpdateCursor(updateTable,updateFields) as updateRows:
            for updateRow in updateRows:
               keyValue = updateRow[0]
               if keyValue in GlobalID_dict and updateRow[1] == None:
                   updateRow[1] = GlobalID_dict[keyValue][0]
                   updateRows.updateRow(updateRow)
               else:
                    pass
    except Exception as err:
        print ('whoopsy daisy ... error updating')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am wondering if its because the field in the table is 'PARENT_GLOBALID' and the field in the point layer is 'GLOBAL_ID'.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 15:02:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/migrating-to-globalid-relationship/m-p/1304895#M44609</guid>
      <dc:creator>SharonUngerer_DNREC</dc:creator>
      <dc:date>2023-06-30T15:02:06Z</dc:date>
    </item>
  </channel>
</rss>

