bulk update
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 1.1k
- Merge medio
- 2h 40m
- PR unite (30g)
- 2
Descrizione
Is your feature request related to a problem? Please describe.
Currently, administrators need to manually update items one by one when organization-wide changes occur. For example, when an organization's terms of use change, or when standardizing titles/descriptions across content types, there's no efficient way to bulk update these text fields across multiple items. This becomes especially time-consuming for organizations with hundreds or thousands of items.
python# Current approach requires iterating through items individually
items = gis.content.search(query="*", max_items=1000)
for item in items:
item.update({"licenseInfo": "New Terms of Use 2024"})
# This is slow and inefficient for large collections
Describe the solution you'd like
Enhance the ContentManager.bulk_update() function to support:
Updating specific fields (title, description, terms of use/licenseInfo) across multiple items
Filtering by item type (Feature Service, Web Map, Experience Builder, StoryMap, etc.)
Option to update all items or only selected types
Proposed implementation:
python# Update all items with new terms of use
gis.content.bulk_update(
update_fields={"licenseInfo": "Updated Terms of Use 2024"},
item_types=None # None = all types
)
# Update only specific item types
gis.content.bulk_update(
update_fields={
"description": "Updated organizational description",
"licenseInfo": "New Terms 2024"
},
item_types=["Web Map", "Feature Service", "StoryMap"]
)
# Update with a search query
gis.content.bulk_update(
update_fields={"title": lambda t: f"[2024] {t}"}, # Prefix existing titles
search_query="owner:admin_user",
item_types=["Web Map"]
)
Describe alternatives you've considered
Using the current bulk_update() with property dictionaries - but this requires building the complete property dict for each item
Writing custom scripts to iterate through items - functional but slow and doesn't leverage potential batch API operations
Using ArcGIS Online Assistant - works but requires manual intervention and doesn't scale well
Additional context
This enhancement would significantly improve administrative workflows for:
Compliance updates (terms of use, privacy policies)
Organizational rebranding (updating descriptions/titles)
Content standardization initiatives
Metadata management at scale
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal punto di ingresso esistente ContentManager.bulk_update() e verifica come funzionano gli aggiornamenti correnti dei dizionari delle proprietà. Confronta questo comportamento con gli esempi richiesti di update_fields, item_types e search_query; il lavoro è completo quando i campi di testo supportati possono essere applicati a tutti gli elementi o ai tipi di elemento filtrati senza richiedere dizionari delle proprietà completi per ogni elemento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100