I'm curious what the best practices are for truncate and load for large datasets into ArcGIS Online feature services using Python. My inclination is to use a spatial data frame, the manager.truncate and edit_features methods on the featurelayer class. However is writing 100k records using edit_features supported? Should I break it up into chunks of 10k and load that way? Maybe wait 10 seconds between each load?
Another patten (one I don't like is much) is using a CSV, shapefile, or something else and then doing the "overwrite layer" pattern. However in most cases I am querying the source data from an API or database elsewhere so its easier to create a SDF instead of a shapefile or CSV.
Yet another is creating a new feature service from the data and choosing replace layer.
The context here is I will sometimes get some unexplained errors using the edit_features method - it will just crash and say "json decode error".