Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create DeleteFeatures_onebyone_Portal.ipynb #1653

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 11, 2023

  1. Create DeleteFeatures_onebyone_Portal.ipynb

    one notebook to delete elements in AGOL one by one.
    rmesend authored Sep 11, 2023
    Configuration menu
    Copy the full SHA
    10fd0f8 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2023

  1. Delete features row by row

    This Python code leverages the `arcgis` library to interact with ArcGIS Online. It begins by establishing a session on ArcGIS Online using your credentials (username and password). You'll need to replace `"tu_usuario"` and `"tu_contraseña"` with your actual ArcGIS Online username and password. Next, it identifies a specific Feature Service within ArcGIS Online by its ID, which you should replace with the actual ID of your desired Feature Service. The code then accesses the first layer within this Feature Service and performs a query to retrieve a list of elements from the layer.
    
    Subsequently, it goes through each retrieved element one by one, deleting them individually using the `edit_features` method with the 'deletes' operation. The 'OBJECTID' attribute is used to uniquely identify and remove each element. Finally, it prints a success message to indicate that the elements have been successfully deleted. It's important to ensure that you have the necessary permissions to perform editing operations on the Feature Service you are working with.
    
    This is an update of this FAQ: https://support.esri.com/en-us/knowledge-base/faq-is-it-possible-to-batch-delete-features-in-arcgis-o-000013805
    rmesend authored Sep 12, 2023
    Configuration menu
    Copy the full SHA
    0879e74 View commit details
    Browse the repository at this point in the history