Select to view content in your preferred language

Append all data from hosted table to a table in a different hosted feature layer

1319
4
Jump to solution
06-16-2023 03:12 AM
Labels (2)
RichardHowe
Frequent Contributor

Hi, I'm looking to append all the data held in a hosted table in ArcGIS Online to another table in a hosted feature layer (with an identical schema) using python.

I've attempted to use the API guidance, but every time I try I get an unknown error on the .append function

Exception: Unknown Error
(Error Code: 500)

Can anyone help with a code sample. All the examples in the guidance focus on CSVs rather than data already in AGOL

0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi @RichardHowe,

If you have an ArcGIS Pro license, use arcpy's Append within your code instead of the ArcGIS API.  It will work with hosted feature services.

View solution in original post

4 Replies
JakeSkinner
Esri Esteemed Contributor

Hi @RichardHowe,

If you have an ArcGIS Pro license, use arcpy's Append within your code instead of the ArcGIS API.  It will work with hosted feature services.

RichardHowe
Frequent Contributor

Thanks @JakeSkinner , that was very helpful. I don't know why that didn't occur to me!

Next question, while you're here. Is it possible to use toolbox validation with the AGOL GIS API. SO for example could I Update a script parameter to populate with every layer in a hosted feature layer for example?

0 Kudos
JakeSkinner
Esri Esteemed Contributor

@RichardHowe yes the validation will work with ArcGIS API.  You just need to import the module.

RichardHowe
Frequent Contributor

Amazing. Thanks

0 Kudos