Skip to content
This repository was archived by the owner on Mar 31, 2020. It is now read-only.
This repository was archived by the owner on Mar 31, 2020. It is now read-only.

.addFeatures doesn't copy over all features #354

@fordty

Description

@fordty

ArcREST Version 3.5.9

Python Scripter v2.6.0.0

Attempting: To erase all the information in a Hosted Feature Layer in AGOL and replace it with updated data from the workday.

Problem: When I run the following code below I receive no errors, however my output is incorrect. when I view my results from Python Interpreter I lose features, Why is this happening.

No matter where I run it from an .sde or a geodatabase I always 745 features and their always the same features. There is no order to the features I lose in the table, what I lose are sprinkled throughout the layer.

Yes, the new table has more then 1592 records
No, its not hitting a limit of some type b/c I am also doing this for a layer with 7270 records and yes I'm losing records here as well but only 7 lost records.

This is a Line Feature

CODE

for i in range(0, 4):
arcpy.AddMessage(AGOL_LayerNames[i])
print(AGOL_LayerNames[i])
arcpy.AddMessage(fc + "\" + SDE_LayerNames[i])
print(fc + "\" + SDE_LayerNames[i])
fst = featureservicetools.featureservicetools(securityinfo)
fs = fst.GetFeatureService(itemId=webmapid,returnURLOnly=False)
fl = fst.GetLayerFromFeatureService(fs=fs,layerName=AGOL_LayerNames[i],returnURLOnly=False)
print fl.query(returnCountOnly=True)
fst.DeleteFeaturesFromFeatureLayer(fl.url, '1=1')
fl.addFeatures(fc=fc + "\" + SDE_LayerNames[i] ,attachmentTable=None)
print fl.query(returnCountOnly=True)

INTERPRETER
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Existing_PE_Mains
P:\connectionfiles\Geometric Network Base.sde\GeometricNetwork.DBO.data\GeometricNetwork.DBO.Existing_PE_Mains
{u'count': 2337} - before the update
{u'count': 1592} - after the update
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+

any help would be appreciated.

Cheers,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions