Select to view content in your preferred language

Query FileGeodatabase Append to Feature Service

74
0
Thursday
kapalczynski
Regular Contributor

I have a local File Geodatabase that I need to query a TABLE and append those records along with ATTACHMENTS to an Oracle DB SDE.

I would rather hit the Service directly using edit_features , but if its easier to hit the db directly I can go that route.  The big issue is that I NEED the attachments to come along with the TABLE values.

I have done this before but that was reading JSON files that I scraped from a Service and Attachments were NOT needed... SO I think a different approach is warranted.

        for x in os.listdir(path):
            if x.startswith("output"):
                filetoImport = path + x
                f = open(filetoImport)
                data = json.load(f)
                featureAddingAdd = data['features']
                add_result = ports_layer.edit_features(adds = featureAddingAdd)

 

QUESTION:

I guess the basic question is whats the BEST way to query a Local File Geodatabase with a WHERE CLAUSE to get specific records from a TABLE and then add those TABLE records and ATTACHMENTS to an Enterprise DB via REST API 'edit_features'

0 Kudos
0 Replies