<?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: Sync hosted feature services to postgres database in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069432#M40705</link>
    <description>&lt;P&gt;Webhooks are a good way to trigger CRUD actions.&amp;nbsp; GeoEvent Server, Notebooks, n8n.io, or Integromat for a few examples to make that happen with or without the use of ArcGIS Pro.&amp;nbsp; n8n.io can be run on premise (low to no cost).&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jun 2021 15:27:23 GMT</pubDate>
    <dc:creator>John_Spence</dc:creator>
    <dc:date>2021-06-17T15:27:23Z</dc:date>
    <item>
      <title>Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069257#M40677</link>
      <description>&lt;P&gt;Sync hosted feature services to postgres database&lt;/P&gt;&lt;P&gt;Does anyone have any experience with syncing hosted feature services with an external postgresql database? We're not using enterprise and would rather not have to go through the cost and effort of setting up and administering enterprise. We are building a web application however which will have non-gis business related data (customer info, order details etc.) which we need to relate to location data hosted on AGOL.&lt;/P&gt;&lt;P&gt;The only solution we can really think of is to sync/copy the gis data from AGOL to the the postgres database.&amp;nbsp; Are there any potential pitfalls/issues? Is it even possible? I'm guessing we might have issues with maintaining relationships?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 08:50:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069257#M40677</guid>
      <dc:creator>lightpro</dc:creator>
      <dc:date>2021-06-17T08:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069341#M40686</link>
      <description>&lt;P&gt;I ran into the same issue a while ago myself.&amp;nbsp; Attached is a copy of the process I use to lift and insert.&amp;nbsp; Basic gist is, I use a Pro project to designate the layer I want to deal with and put the SDE connections to be used there.&amp;nbsp; I am trying to remember if I run into issues with the service extraction due to limitations on max records of the service or not, but I can't recall it at the moment.&lt;/P&gt;&lt;P&gt;Oh!&amp;nbsp; I probably should mention that the password for the portal or AGOL user specified needs to be encoded in base64.&amp;nbsp; Obviously, not secure, but good enough for the casual eye.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 13:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069341#M40686</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2021-06-17T13:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069347#M40687</link>
      <description>&lt;P&gt;We have nightly scripts that sync hosted layers with both postgres and MSSQL servers, and they work great! You need to know a bit of python, but it's definitely possible.&lt;/P&gt;&lt;H3&gt;Prep Work&lt;/H3&gt;&lt;P&gt;If you don't have one already, develop a query statement that returns the data you want from the database and save it as its own *.sql file. Or maybe you're just copying entire tables? You may be able to skip this.&lt;/P&gt;&lt;P&gt;You'll also want to create the hosted layer first. You can do this by first publishing an extract from the database, or by creating an empty layer. As long as the schema is correct.&lt;/P&gt;&lt;H3&gt;The Process&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Using pandas, &lt;A href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql.html" target="_self"&gt;read your sql query (or table) into a dataframe&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;Make any adjustments to the data you need&lt;/LI&gt;&lt;LI&gt;Using the ArcGIS Python API's Dataframe.spatial submodule, you can &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer.edit_features" target="_self"&gt;edit the hosted layer&lt;/A&gt; and supply the dataframe as the new / updated features.&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Considerations&lt;/H3&gt;&lt;P&gt;If you just want to keep it simple, you can &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.managers.html#arcgis.features.managers.FeatureLayerManager.truncate" target="_self"&gt;truncate the hosted layer&lt;/A&gt; and just re-add everything fresh. Depending on the size of your table and the frequency of updates, this may or may not be feasible. If you want to go a different route than truncate/append, you'll need some way of identifying unique records in the postgres database and comparing them against the hosted layer.&lt;/P&gt;&lt;P&gt;An easy way to do this is to include the postgres primary key as its own field in the hosted layer. You can &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer.query" target="_self"&gt;query the hosted layer&lt;/A&gt; to its own dataframe, and then&lt;A href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.compare.html" target="_self"&gt; compare the two dataframes&lt;/A&gt; to identify rows which have changed between the postgres table and the hosted layer. The result of the comparison could allow you to subset the postgres dataframe, then submit that subset as your adds/edits, joining in the hosted objectID / globalID based on the shared primary key field.&lt;/P&gt;&lt;P&gt;But that can get a bit complicated.&lt;/P&gt;&lt;P&gt;Either way, get that script scheduled to run on a machine that has access to the postgres database and you're set!&lt;/P&gt;&lt;P&gt;We have about 20 hosted layers that all "mirror" an external database or some query therefrom, which for whatever reason cannot be published directly from said database. Our scripts run weeknights with some added exception handling and logging, but 99% of the time they go off without a hitch.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Long story short: if you have the patience to write up and debug some python, you can do pretty much anything you want between a hosted layer and an external database.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:04:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069347#M40687</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-06-17T14:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069356#M40688</link>
      <description>&lt;P&gt;Wow thanks! Will need some time to digest it. I assume this requires a server license in order to setup your postgres geodatabase etc.?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069356#M40688</guid>
      <dc:creator>lightpro</dc:creator>
      <dc:date>2021-06-17T14:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069358#M40689</link>
      <description>&lt;P&gt;Yes, in my example it is working on the assumption you have a SDE database (server license needed), but in all honesty you could just change the connection type to be whatever you want and go from there.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:19:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069358#M40689</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2021-06-17T14:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069362#M40690</link>
      <description>&lt;P&gt;Ok that might be the way we go but I'm working on the assumption that we won't have an SDE database. Depends on budget!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069362#M40690</guid>
      <dc:creator>lightpro</dc:creator>
      <dc:date>2021-06-17T14:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069369#M40691</link>
      <description>&lt;P&gt;Gotchya.&amp;nbsp; Well, you can add non-SDE databases in a Pro project so you could be good to go there.&amp;nbsp; There is also the option of scraping the data from the service, again though, you can run into the max record count limitation.&lt;BR /&gt;&lt;BR /&gt;Assuming you have to authenticate to get it at it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;P&gt;def get_token():&lt;BR /&gt;#-------------------------------------------------------------------------------&lt;BR /&gt;# Name: Function -&lt;BR /&gt;# Purpose:&lt;BR /&gt;#-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;data = checklist.b64decode(AGOL_Pass)&lt;BR /&gt;pw = data.decode("ascii")&lt;/P&gt;&lt;P&gt;url = '&lt;A href="https://www.arcgis.com/sharing/rest/generateToken" target="_blank"&gt;https://www.arcgis.com/sharing/rest/generateToken&lt;/A&gt;'&lt;BR /&gt;values = {'f': 'json',&lt;BR /&gt;'username': AGOL_User,&lt;BR /&gt;'password': pw,&lt;BR /&gt;'referer' : '&lt;A href="https://www.arcgis.com" target="_blank"&gt;https://www.arcgis.com&lt;/A&gt;',&lt;BR /&gt;'expiration' : '10'}&lt;/P&gt;&lt;P&gt;data = urllib.parse.urlencode(values).encode("utf-8")&lt;BR /&gt;req = urllib.request.Request(url)&lt;/P&gt;&lt;P&gt;response = None&lt;BR /&gt;while response is None:&lt;BR /&gt;try:&lt;BR /&gt;response = urllib.request.urlopen(req,data=data)&lt;BR /&gt;except:&lt;BR /&gt;pass&lt;/P&gt;&lt;P&gt;the_page = response.read()&lt;/P&gt;&lt;P&gt;#Garbage Collection with some house building&lt;BR /&gt;payload_json = the_page.decode('utf8')&lt;BR /&gt;payload_json = json.loads(payload_json)&lt;/P&gt;&lt;P&gt;edit_token = payload_json['token']&lt;/P&gt;&lt;P&gt;return (edit_token)&lt;/P&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;You can use something like this to scrape it out.&amp;nbsp; The script is to count and ID a specific item in my case, but you can swap things around easily enough to just scrape the entire dataset.&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;P&gt;def queryCount(scriptName, edit_token):&lt;BR /&gt;#-------------------------------------------------------------------------------&lt;BR /&gt;# Name: Function -&lt;BR /&gt;# Purpose:&lt;BR /&gt;#-------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;FS_service = service_StatusURL + '/query/?token={}'.format(edit_token)&lt;/P&gt;&lt;P&gt;where_statement = 'JobName=\'{}\''.format(scriptName)&lt;/P&gt;&lt;P&gt;data = urllib.parse.urlencode({'f': 'json', 'where': where_statement, 'returnCountOnly': 'true'}).encode('utf-8')&lt;/P&gt;&lt;P&gt;req = urllib.request.Request(FS_service)&lt;BR /&gt;response = urllib.request.urlopen(req,data=data)&lt;BR /&gt;response_payload = response.read()&lt;BR /&gt;response_payload = json.loads(response_payload)&lt;/P&gt;&lt;P&gt;item_count = response_payload['count']&lt;/P&gt;&lt;P&gt;if item_count &amp;gt; 0:&lt;BR /&gt;response = None&lt;BR /&gt;while response is None:&lt;BR /&gt;try:&lt;BR /&gt;where_statement = 'JobName=\'{}\''.format(scriptName)&lt;/P&gt;&lt;P&gt;data = urllib.parse.urlencode({'f': 'json', 'where': where_statement, 'outFields':'OBJECTID'}).encode('utf-8')&lt;/P&gt;&lt;P&gt;req = urllib.request.Request(FS_service)&lt;BR /&gt;response = urllib.request.urlopen(req,data=data)&lt;BR /&gt;response_payload = response.read()&lt;BR /&gt;response_payload = json.loads(response_payload)&lt;BR /&gt;for oid_item in response_payload['features']:&lt;BR /&gt;objectID = oid_item['attributes']['OBJECTID']&lt;/P&gt;&lt;P&gt;except:&lt;BR /&gt;print ('\t...Failure to count. Trying again.')&lt;/P&gt;&lt;P&gt;time.sleep(30)&lt;BR /&gt;response = None&lt;BR /&gt;else:&lt;BR /&gt;objectID = '0'&lt;/P&gt;&lt;P&gt;return (item_count, objectID)&lt;/P&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:31:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069369#M40691</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2021-06-17T14:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069384#M40692</link>
      <description>&lt;LI-CODE lang="python"&gt;from arcgis import GIS
import pandas

gis = GIS('your-org-url', 'user', 'password')

# Alter list index as needed, if multiple layers, or use '.tables[0]' for non-spatial
hosted_fl = gis.content.get('hosted-layer-itemid').layers[0]

psql_df = pandas.read_sql('your sql query', 'postgresql+psycopg2://user:pw@host/db')

hosted_fl.manager.truncate()

hosted_fl.edit_features(adds=psql_df.spatial.to_featureset())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/224308"&gt;@John_Spence&lt;/a&gt;'s script is &lt;EM&gt;incredible&lt;/EM&gt;, and I love a well-documented tool, I thought I'd elaborate on my my own process a bit, just in case you wanted to work outside of the Pro environment.&lt;/P&gt;&lt;P&gt;This sort of script will run anywhere so long as the required modules are in the python env, which can be nice if you have, say, a Linux server, or just don't need Pro on your DB machine.&lt;/P&gt;&lt;P&gt;I forgot to ask, but is the layer spatial or non-spatial? Pandas might not pick up a geometry column, but &lt;STRONG&gt;GeoPandas&lt;/STRONG&gt; can. It only adds a couple steps, but preserves the geometry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis import GIS, GeoAccessor
import geopandas
from sqlalchemy import create_engine

gis = GIS('your-org-url', 'user', 'password')

hosted_fl = gis.content.get('hosted-layer-itemid').layers[0]

con = create_engine('postgresql+psycopg2://user:pw@host/db')

gdf = geopandas.GeoDataFrame.from_postgis('your-query', con, 'geometry-column-name')

sdf = GeoAccessor.from_geodataframe(gdf)

hosted_fl.manager.truncate()

hosted_fl.edit_features(adds=sdf.spatial.to_featureset())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:49:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069384#M40692</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-06-17T14:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069386#M40693</link>
      <description>&lt;P&gt;Great explanation, this seems pretty feasible although I'm not sure how I feel about truncating! In any case, we could end up making changes to data on the hosted layer that we want to sync back to the posgres db so truncating/appending wouldn't be suitable and we'd need to compare for changes and sync the most recent ones. Could get complicated as you say.&lt;/P&gt;&lt;P&gt;When you say:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;You'll also want to create the hosted layer first. You can do this by first publishing an extract from the database, or by creating an empty layer. As long as the schema is correct&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Is there any simple way to do this so that we ensure the schemas match or is our only option to create the hosted feature layers manually (or with python)?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069386#M40693</guid>
      <dc:creator>lightpro</dc:creator>
      <dc:date>2021-06-17T14:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069391#M40694</link>
      <description>&lt;P&gt;Someone had to go&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":panda_face:"&gt;🐼&lt;/span&gt; here&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;!&amp;nbsp; I am actually glad you did that because I usually end up working around it vs. leveraging the power of Pandas sadly.&amp;nbsp; The only other option I can think of would be to drop the arcgis component entirely and just run pyodbc.&amp;nbsp; Scrape and insert fantastic.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;...made my day!&amp;nbsp; Hope you're having a good day out there.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:57:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069391#M40694</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2021-06-17T14:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069396#M40695</link>
      <description>&lt;P&gt;I posted my initial reply before I seen your second post. Really helpful thanks, I'd like to work outside Pro so this is perfect. Yes, we would have some spatial data so if we can use geopandas that would be ideal.&lt;/P&gt;&lt;P&gt;This is a great starting point, thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069396#M40695</guid>
      <dc:creator>lightpro</dc:creator>
      <dc:date>2021-06-17T14:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069403#M40696</link>
      <description>&lt;P&gt;Excellent! Between you and &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt; I've got several options! Will take me some time to get my head around it all!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 15:03:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069403#M40696</guid>
      <dc:creator>lightpro</dc:creator>
      <dc:date>2021-06-17T15:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069407#M40697</link>
      <description>&lt;P&gt;On the first run, you can &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.GeoAccessor.to_featurelayer" target="_self"&gt;publish a spatial dataframe directly to a service&lt;/A&gt;. That would ensure that the schemas match, though the function likes to "sanitize" column names, i.e., SomeLayer becomes somelayer.&lt;/P&gt;&lt;P&gt;Moving edits back and forth certainly makes this trickier, and a no-go on simply truncating.&lt;/P&gt;&lt;P&gt;So, are you making edits on both "sides" of the hosted/db divide, and are looking to keep the latest changes in either space current with the other?&lt;/P&gt;&lt;P&gt;Once published, you can enable editor tracking on the hosted layer and query it based on the "last_modified" timetamp. Do you have a similar timestamp field in the postgres? I think that would probably be necessary to get this working in both directions.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 15:08:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069407#M40697</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-06-17T15:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069420#M40701</link>
      <description>&lt;P&gt;That looks perfect for matching the schemas &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm not 100% sure if we'll need to make edits on both sides but I think probably will. For example, we'll have a table for work orders and the thinking is to use this to generate jobs in Workforce or Survey123 so we'd need to be able to update the job status (e.g. in progress, complete etc.) and have that reflected back in the database.&lt;/P&gt;&lt;P&gt;Editor tracking is probably the way to go as you suggest.&lt;/P&gt;&lt;P&gt;Another possibility that was mentioned by our Dev was to use webhooks to&amp;nbsp; keep everything synced and updated pretty much in realtime. Any thoughts on this as a solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 15:16:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069420#M40701</guid>
      <dc:creator>lightpro</dc:creator>
      <dc:date>2021-06-17T15:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sync hosted feature services to postgres database</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069432#M40705</link>
      <description>&lt;P&gt;Webhooks are a good way to trigger CRUD actions.&amp;nbsp; GeoEvent Server, Notebooks, n8n.io, or Integromat for a few examples to make that happen with or without the use of ArcGIS Pro.&amp;nbsp; n8n.io can be run on premise (low to no cost).&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 15:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sync-hosted-feature-services-to-postgres-database/m-p/1069432#M40705</guid>
      <dc:creator>John_Spence</dc:creator>
      <dc:date>2021-06-17T15:27:23Z</dc:date>
    </item>
  </channel>
</rss>

