Closed Nova-Scotia closed 3 years ago
@Nova-Scotia we do not support direct data write to portal from an R dataframe. I recommend the following workaround using the new scheduler in ArcGIS Pro:
This will be the most error-prone way of updating the remote data source.
Ok, thanks, appreciate the resources. I hope it's considered for a future release. I wrote a number of models in Pro that used R scripts and they worked for a few weeks then just stopped working, no changes on this end, so I went back to working straight from R - it was really disheartening after all that work!
Can you clarify what you mean in your last sentence?
@Nova-Scotia sorry to hear that you are having issues with script tools. I will try to repro problems with script tools.
As per writing data to portals, that is on our list of things to do or at least look into. Writing to portals opens up many issues related to safety of portals and overall portal management.
As per the last sentence, I mean either Option 1 or Option 2 being stable ways of updating your remote data product. I recommend Option 2 for now as it is simpler. If there is a recurring issue about R script tools that you encounter, please let us know.
@Nova-Scotia did you resolve your issue? I am having the same issue while writing data from R (4.0.3) to geodatabase. The script was working before.
fgdb = TG_Clip_10252020.gdb
arc.write(path = paste0(fgdb,"/digitized_Ag_Cliped_noOverlap/TG_classified_0"),data = allData,overwrite = TRUE,
validate = TRUE).
Thank you!
@suvedimukti I don't have any issues writing to regular (local) geodatabases, just to hosted feature classes.
Hello @suvedimukti,
I have the same problem as you. I have tried to update the Geodatabase of ArcGIS Pro with the data I have loaded in R.
arc.write(path = "C:/Users/Patricia/Documents/ArcGIS/Projects/MyProject/MyProject.gdb/carrers", data = sfInfraestr[sfInfraestr$type!='zones30 poligons',], validate=TRUE, overwrite=TRUE)
And I get the following error: Error in .call_proxy("arc_write", path, pairlist(data = data, coords = coords, : failed to overwrite existing dataset. use arc.delete(path) or add overwrite=TRUE argument
Did you solved it?
Thanks!
Hi @patriciaandolz , I've found that sometimes, using "overwrite = TRUE" isn't enough. Try doing what they suggest and including a line of code to delete the old layer (if you've made a backup first!) first.
Hi @Nova-Scotia , thanks!! I was having troubles becaus I had the ArcGIS Pro opened while I has trying to update the data.
Hi @patriciaandolz ,
In my case, I had opened the exported layer from R in ArcGIS pro, then I removed it from the map, the error was persistent even after removing the layer from the map. I ended up getting arcgisbinding package updated to the latest version and it worked. If it throws the same error even after removing the layer from Map, simply close Arcgis Pro- it should work fine.
@suvedimukti good to hear this is resolve. @patriciaandolz does the writing issue still persist?
That solution worked fine for me. So it is solved ;-)
Issue resolved.
I regularly update a layer stored in ArcGIS Online (AGOL), every week from my local computer. When I try to overwrite the web layer with a
sf
data.frame
usingarc.write
I get the following error, e.g.,Using R v4.0.2. on Windows computer, arcgisbinding v1.0.1.243.
Is there any way to overwrite a web layer from R?