Select to view content in your preferred language

Append from AGOL to SDE

439
2
Jump to solution
12-19-2023 07:20 AM
kapalczynski
Regular Contributor

Wondering if I am hitting a limitation or what...

I am trying to Append Data from my AGOL site to my internal Oracle SDE DB

It seems to accept the sourceURL but fails targetURL

Is there an issue that I am trying to append to a Table and not a Feature Class....

any other thoughts?

import arcpy
import arcgis
from arcgis import GIS

arcpy.env.overwriteOutput = True

gis = GIS("https://www.maps.arcgis.com/home", "username", "password")
currenttoken = gis._con.token

sourceURL = "https://services.arcgis.com/p5vkdfgdfgf/arcgis/rest/services/Inventory/FeatureServer/8?token=" + currenttoken + "sublayer=0"

targetURL = "Database Connections\\GIS_DEV@gis_guest.sde\\GIS_DATA.TBL_MS4_PermPaveInsp"

with arcpy.EnvManager(preserveGlobalIds=True):
    arcpy.management.Append(sourceURL, targetURL, "TEST_AND_SKIP", None, '', '')
    

 

ERROR:

arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Target Dataset: Dataset Database Connections\GIS_DEV@gis_guest.sde\GIS_DATA.TBL_MS4_PermPaveInsp does not exist or is not supported
Failed to execute (Append).

 

 

0 Kudos
1 Solution

Accepted Solutions
kapalczynski
Regular Contributor

Never mind .... feel foolish I had the SDE connection file name wrong.... uggggg

it was @GIS_data not @GIS_guest... boy I feel foolish....

View solution in original post

0 Kudos
2 Replies
kapalczynski
Regular Contributor

Never mind .... feel foolish I had the SDE connection file name wrong.... uggggg

it was @GIS_data not @GIS_guest... boy I feel foolish....

0 Kudos
luckachi
Occasional Contributor III

Hi @kapalczynski - I am trying to do the same thing and I had a question for you. Does this process handle any attachments that may be with the AGO records?

0 Kudos