Store Survey 123 Table in local SDE

5555
52
11-02-2016 01:39 PM
jaykapalczynski
Frequent Contributor

I created a collection in Survey 123 but when it publishes it stores the table and attachements in ArcGIS Online. This is not much of an issues other than the fact that I need to Join this table to data that is on my local SDE environment. I cant seem to figure that part out.

  1. Can I create a Relationship Class to a table created from Survey 123 that resides in ArcGIS online to a local Feature Class in my local servers SDE.
  2. Can I move the location of the table and Attachments created by Survey123 to my local SDE Server?
    1. Is there some sort of setting that forces the creation of tables etc to my server not ArcGIS Online?
    2. Set a workspace to my server instead of ArcGIS online????
  3. Can I create a Relationship class in ArcGIS online that relates the table created in Survey123 (located in AGO) to a feature class on my local server?
52 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Jay,

Relationship classes can only be created between tables and feature classes within the same geodatabase.  

In terms of migrating your Survey123 data to an enterprise geodatabase, we're just finishing up a blog post describing it; in the meantime, you could try out a sample script designed to synchronize the data - GitHub - tedrick/SyncSurvey: Synchronize a Hosted Featuer Service to an Enterprise Geodatabase  (it's not foolproof; another user was having some issues that I had trouble replicating).

In terms of the survey going directly to your own ArcGIS Server service, it's a planned expansion of the the submission_url property of the survey - Submission URL—Survey123 for ArcGIS | ArcGIS .  Currently submission_url only supports other hosted services, whether using Portal or ArcGIS Online.

jaykapalczynski
Frequent Contributor

First off thanks fro the response...Much Appreciated.

So if I get you right....Synchronize the data portion of you response.  I would have a second copy of the Survey123 FS on my EGDB and simply sync the two.  When Survey123 updates the copy on my EGDB would update as well.

Is that what you are getting at?

EDIT:  I haven't checked but does this sync Attachments as well....I have a bunch of images attached to each record in Survey123 FC

0 Kudos
JamesTedrick
Esri Esteemed Contributor

The synchronization script downloads the data in the Survey123 Feature Service and then creates/updates a set of tables in the EGDB.  It maintains relationships and attachments.

0 Kudos
jaykapalczynski
Frequent Contributor

OK thanks...gonna give that a try. 

I assume that I have to create a scheduled Task every few hours to run the script?

0 Kudos
jaykapalczynski
Frequent Contributor

Question:

Where and how do I specify the exact folder in AGO that the feature class resides?

I see the get Token getToken(username, password=None, portal_URL = 'https://www.arcgis.com'

but dont see where I am grabbing the specific workspace (folder) in AGO that was created by Survey123

0 Kudos
JamesTedrick
Esri Esteemed Contributor

You can get a list of folders at the user content REST endpoint ArcGIS REST API and do a match on the Survey name to the folder's id.  This is for auto-scanning a user's content to discover survey feature services?

0 Kudos
jaykapalczynski
Frequent Contributor

So I can run the script as is and it will find all the Survey123 projects in AGO?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

No, I thought you were modifying the script.  The script itself takes the service endpoint as input.

0 Kudos
jaykapalczynski
Frequent Contributor

Where do I specify my Server/instance?

0 Kudos