<?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: How do you automatically copy collected data to another database? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83787#M3249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may be able to fire the python script using a database trigger, but I've never attempted this before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Aug 2014 12:52:35 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2014-08-27T12:52:35Z</dc:date>
    <item>
      <title>How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83782#M3244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;G'day All!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;No response in the ArcCollector place and probably more relevant to here anyways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;What hooks / notifications are there to use after a REST service has updated a feature class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Once data has come 'in' from Collector, we wish to add a notification to a different system.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Database triggers and scheduled tasks are frowned upon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Any suggestions greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 05:48:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83782#M3244</guid>
      <dc:creator>GISSupport3</dc:creator>
      <dc:date>2014-08-27T05:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83783#M3245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create a &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000v1000000"&gt;replica&lt;/A&gt; between your geodatabases.&amp;nbsp; However, synchronizing the changes would be a manual process w/o creating a scheduled task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 11:10:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83783#M3245</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-08-27T11:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83784#M3246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day Jake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I like the idea and not sure it will work in this situation? Some more details from me may help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A field user submits a situation report or a weather report or something with ArcCollector.&lt;/P&gt;&lt;P&gt;This data lands in HQ in our field geodatabase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We then wish to automatically populate an event log in our operational system (non spatial) database.&lt;/P&gt;&lt;P&gt;HH:MM: Joe Blogs: New weather report: Temp: 39, Humidity 22 etc etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(To add to the mix, the event log also requires an incident name and there is NO attribute in ArcCollector to say what is the relevant incident(s). We would prefer users NOT to type this in. There will be multiple collectors at multiple incidents at any one time. Some spatial analysis is also required as a part of the automation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe can't avoid trigger / scheduled task?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 11:56:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83784#M3246</guid>
      <dc:creator>GISSupport3</dc:creator>
      <dc:date>2014-08-27T11:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83785#M3247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Python would be best for this situation.&amp;nbsp; You can query the feature service, and then update the database table.&amp;nbsp; Here is an example on how to query an ArcGIS Online hosted feature service:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14091413587038945" jivemacro_uid="_14091413587038945"&gt;
&lt;P&gt;import urllib, urllib2, json, smtplib&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;username = "gis"&lt;/P&gt;
&lt;P&gt;password = "p@ssword"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#generate token&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;tokenURL = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://www.arcgis.com/sharing/rest/generateToken" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest/generateToken&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;params = {'f': 'pjson', 'username': username, 'password': password, 'referer': '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.arcgis.com" rel="nofollow" target="_blank"&gt;http://www.arcgis.com&lt;/A&gt;&lt;SPAN&gt;'}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;req = urllib2.Request(tokenURL, urllib.urlencode(params))&lt;/P&gt;
&lt;P&gt;response = urllib2.urlopen(req)&lt;/P&gt;
&lt;P&gt;data = json.load(response)&lt;/P&gt;
&lt;P&gt;token = data['token']&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;#query service to retrieve how many are of type 'Single Dwelling Houses'&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;damageAssessmentURL = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgis.com/FBBJUji5ArUSDM/arcgis/rest/services/Damage_Assessment_Arlington/FeatureServer/0/query" rel="nofollow" target="_blank"&gt;http://services.arcgis.com/FBBJUji5ArUSDM/arcgis/rest/services/Damage_Assessment_Arlington/FeatureServer/0/query&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;where = "PropertyType = 'Single Dwelling Houses'"&lt;/P&gt;
&lt;P&gt;params = {'f': 'pjson', 'where': where, 'returnCountOnly': 'true', 'token': token}&lt;/P&gt;
&lt;P&gt;req = urllib2.Request(damageAssessmentURL, urllib.urlencode(params))&lt;/P&gt;
&lt;P&gt;response = urllib2.urlopen(req)&lt;/P&gt;
&lt;P&gt;data = json.load(response)&lt;/P&gt;
&lt;P&gt;print data['count']&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommend a scheduled task to run the script at a given interval to update the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 12:10:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83785#M3247</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-08-27T12:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83786#M3248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;G'day Jake&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to confirm, there is no (simple / efficient) way to fire the python from a notification from the server; ie running as a listener rather than scheduled task?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 12:35:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83786#M3248</guid>
      <dc:creator>GISSupport3</dc:creator>
      <dc:date>2014-08-27T12:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83787#M3249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may be able to fire the python script using a database trigger, but I've never attempted this before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 12:52:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83787#M3249</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-08-27T12:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83788#M3250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. Not sure what way we'll go and time will tell.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:20:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83788#M3250</guid>
      <dc:creator>GISSupport3</dc:creator>
      <dc:date>2014-08-27T13:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you automatically copy collected data to another database?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83789#M3251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's still a trigger, but you could easily call a web service, from there you have all options ava - ArcObjects, direct db interaction, ect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.codeproject.com/Articles/428200/How-to-invoke-a-Web-Service-from-a-Stored-Procedur" title="http://www.codeproject.com/Articles/428200/How-to-invoke-a-Web-Service-from-a-Stored-Procedur"&gt;How to invoke a Web Service from a Stored Procedure - CodeProject&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 16:27:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-you-automatically-copy-collected-data-to/m-p/83789#M3251</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2014-08-28T16:27:08Z</dc:date>
    </item>
  </channel>
</rss>

