I am attempting to query existing hosted FeatureLayer features and push them to an existing hosted table using the edit_features function and adds parameter. The FeatureLayer and table have the same schemas with the exception of geometry not present in the table.
The code executes all the way through but no new records are added to the hosted table. There are only 64 records being added so there is no limitation issue. Is edit_features the correct function to use or should append be used instead?
#pacpInspects is existing hosted FeatureLayer
#histInspects is existing hosted table
#existPipes is a list of PipeIDs
numExistPipes = 64
records_to_add = []
for x in range(0,numExistPipes):
pipe = existPipes[x]
pipeQuery = pacpInspects.query(where="""PipeID = '%s'"""% pipe, out_fields='*')
feature_to_be_added = deepcopy(pipeQuery.features[0])
records_to_add.append(feature_to_be_added)
histInspects.edit_features(adds=records_to_add)