<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extract Data from Open Data in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265291#M67016</link>
    <description>&lt;P&gt;Update:&amp;nbsp; Dont mind this remark&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2023 01:07:05 GMT</pubDate>
    <dc:creator>kapalczynski</dc:creator>
    <dc:date>2023-03-08T01:07:05Z</dc:date>
    <item>
      <title>Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265132#M67003</link>
      <description>&lt;P&gt;I have this URL:&amp;nbsp;&lt;A href="https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/explore?location=37.930449%2C-79.486800%2C7.65" target="_blank"&gt;https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/explore?location=37.930449%2C-79.486800%2C7.65&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/about" target="_blank"&gt;https://geohub-vadeq.hub.arcgis.com/datasets/57759688e4944bb987add68c4f0c5ada_104/about&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use python/arcpy and download all its data.&amp;nbsp; If I use the RestEndpoint there is a limit of 1000 records.&amp;nbsp; I cant seem to get all 50k.&lt;/P&gt;&lt;P&gt;Any ideas on how I can programmatically ?&amp;nbsp; Looking to get a GeoJSON or JSON and write it to a JSON file locally...&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 19:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265132#M67003</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T19:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265149#M67005</link>
      <description>&lt;P&gt;I can manually do it here but I want to do this programmatically&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kapalczynski_0-1678220517239.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64589i9D10D5BF205DCF39/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kapalczynski_0-1678220517239.png" alt="kapalczynski_0-1678220517239.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 20:23:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265149#M67005</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T20:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265161#M67006</link>
      <description>&lt;P&gt;I do this kind of thing all the time! Love data mining. You have to group your requests in batches of whatever the max number of records that will be returned is, in this case 1000. Here's a code snippet I modified from something I use regularly.&amp;nbsp; You can set it up to run on task to be fully automated. You'll have to put in your desired output paths and it should run.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import requests
import json
import os
import sys
import traceback
from datetime import date

arcpy.env.overwriteOutput = True

class DataScraper():
    def __init__(self):
        # URL to map service you want to extract data from
        self.service_url = 'https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/104'

    def getServiceProperties(self, url):
        URL = url
        PARAMS = {'f' : 'json'}
        r = requests.get(url = URL, params = PARAMS)
        service_props = r.json()
        return service_props


    def getLayerIds(self, url, query=None):
        URL = url + '/query'
        PARAMS = {'f':'json', 'returnIdsOnly': True, 'where' : '1=1'}
        if query:
            PARAMS['where'] = "ST = '{}'".format(query)
        r = requests.get(url = URL, params = PARAMS)
        data = r.json()
        return data['objectIds']


    def getLayerDataByIds(self, url, ids):
        # ids parameter should be a list of object ids
        URL = url + '/query'
        field = 'OBJECTID'
        value = ', '.join([str(i) for i in ids])
        PARAMS = {'f': 'json', 'where': '{} IN ({})'.format(field, value), 'returnIdsOnly': False, 'returnCountOnly': False, 'returnGeometry': True,
                  'outFields': '*'}
        r = requests.post(url=URL, data=PARAMS)
        layer_data = r.json()
        return layer_data

    # UTILITIES
    def chunks(self, lst, n):
        # Yield successive n-sized chunks from list
        for i in range(0, len(lst), n):
            yield lst[i:i + n]

if __name__ == '__main__':
    # Can use date for naming iterative runs...
    todays_date = date.today().strftime("%Y_%m_%d")
    # Instantiate DataScraper class
    ds = DataScraper()

    # Specify where you want to save output JSON and feature class on your machine
    out_json_path = rf"e:/data{todays_date}.json"
    out_fc_path = rf"e:/data{todays_date}.shp"

    # Function call to DataScraper class to get number of records, chunk up OIDs
    # and send requests to serivce. Results are compiled into single JSON and then
    # converted to shapefile/feature class at the end.
    def scrapeData(out_json_path, out_fc_path):
        try:
            service_props = ds.getServiceProperties(ds.service_url)
            max_record_count = service_props['maxRecordCount']
            layer_ids = ds.getLayerIds(ds.service_url)
            id_groups = list(ds.chunks(layer_ids, max_record_count))

            for i, id_group in enumerate(id_groups):
                print('  group {} of {}'.format(i+1, len(id_groups)))
                layer_data = ds.getLayerDataByIds(ds.service_url, id_group)

                if i==0: # If first iteration of id_groups
                    layer_data_final = layer_data
                else:
                    layer_data_final['features'].extend(layer_data['features'])

            print('Writing JSON file...')
            with open(out_json_path, 'w') as out_json_file:
                    json.dump(layer_data_final, out_json_file)

            print('Converting JSON to features...')
            arcpy.conversion.JSONToFeatures(out_json_path, out_fc_path)

        except Exception:
            # Handle errors accordingly...this is generic
            tb = sys.exc_info()[2]
            tb_info = traceback.format_tb(tb)[0]
            pymsg = f'PYTHON ERRORS:\n\tTraceback info:\t{tb_info}\n\tError Info:\t{str(sys.exc_info()[1])}\n'
            msgs = f'ArcPy ERRORS:\t{arcpy.GetMessages(2)}\n'
            print(pymsg)
            print(msgs)


# Run the function to get your data
scrapeData(out_json_path, out_fc_path)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 20:52:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265161#M67006</guid>
      <dc:creator>AaronCole1</dc:creator>
      <dc:date>2023-03-07T20:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265262#M67009</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/109401"&gt;@AaronCole1&lt;/a&gt;&amp;nbsp; Dang man.... thats awesome.... this one is going into Source Safe..... Cheers Dude&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 23:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265262#M67009</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-07T23:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265277#M67011</link>
      <description>&lt;P&gt;That's a very nice program&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/109401"&gt;@AaronCole1&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I've been doing a lot of scraping recently and have had good luck using FeatureClassToFeatureClass. It only works on one layer at a time, you have to feed it the REST service URL, and doesn't write to JSON like you want....&lt;/P&gt;&lt;LI-CODE lang="c"&gt;arcpy.conversion.FeatureClassToFeatureClass(in_url, os.path.dirname(out_fc), os.path.basename(out_fc))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 00:09:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265277#M67011</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2023-03-08T00:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265287#M67014</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/192850"&gt;@DonMorrison1&lt;/a&gt;&amp;nbsp; lol!!! 100 lines of code...or one?&amp;nbsp;Thanks for posting. The simplicity of this versus iterating over the service and compiling the JSON responses is striking. I have the above code for an old customer that needed GeoJSON and it's faster to poll the service, but in the end who's counting!? In this case, if you just want the output, brevity wins! Well played sir!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 00:29:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265287#M67014</guid>
      <dc:creator>AaronCole1</dc:creator>
      <dc:date>2023-03-08T00:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265291#M67016</link>
      <description>&lt;P&gt;Update:&amp;nbsp; Dont mind this remark&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:07:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265291#M67016</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T01:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265292#M67017</link>
      <description>&lt;P&gt;You should just be able to replace the &lt;EM&gt;out_fc_path&lt;/EM&gt; variable with the path to your data...that could be an sde feature class.&amp;nbsp; You'd point to your connection file, something like "P:/Folder/Folder/ConnectionFile.sde/GIS.DBO.FeatureClassName"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 00:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265292#M67017</guid>
      <dc:creator>AaronCole1</dc:creator>
      <dc:date>2023-03-08T00:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265297#M67018</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/192850"&gt;@DonMorrison1&lt;/a&gt;&amp;nbsp; that was even slicker... I love both options and learning a ton .... I thank both of you.... Didn't think I could do this that way...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I can get rid of some of the imports.... from the last script....&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy
import requests
import json
import os
import sys
import traceback
from datetime import date

arcpy.env.overwriteOutput = True

def copyData():
    # Set local variables
    inFeatures = 'https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/102'
    outLocation = r"C:\Users\xx\Desktop\GIS_projects\TestingExportData\output.gdb"
    outFeatureClass = "TEST_PetTankFac"
    ## Add Expression
    #delimitedField = arcpy.AddFieldDelimiters(arcpy.env.workspace, "NAME")
    #expression = delimitedField + " = 'Post Office'"
         
    # Run FeatureClassToFeatureClass
    arcpy.conversion.FeatureClassToFeatureClass(inFeatures, outLocation, outFeatureClass)

if __name__ == '__main__':
    copyData()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:01:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265297#M67018</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T01:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265299#M67019</link>
      <description>&lt;P&gt;Got it working... Rocking...&lt;/P&gt;&lt;P&gt;Just wrote it to a FGDB for now... but SDE next per your last comment.... CHEERS&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;import arcpy
import requests
import json
import os
import sys
import traceback
from datetime import date

arcpy.env.overwriteOutput = True

def copyData():
    # Set local variables
    inFeatures = 'https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/102'
    outLocation = r"C:\Users\xxx\Desktop\GIS_projects\TestingExportData\output.gdb"
    outFeatureClass = "TEST_PetTankFac"
    ## Add Expression
    #delimitedField = arcpy.AddFieldDelimiters(arcpy.env.workspace, "NAME")
    #expression = delimitedField + " = 'Post Office'"
         
    # Run FeatureClassToFeatureClass
    arcpy.conversion.FeatureClassToFeatureClass(inFeatures, outLocation, outFeatureClass)

if __name__ == '__main__':
    copyData()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:09:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265299#M67019</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T01:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265300#M67020</link>
      <description>&lt;P&gt;That is something else when the method named 'FeatureClassToFeatureClass' does what 'JSONToFeatures_conversion' sounds like it should do...&lt;/P&gt;&lt;P&gt;It looks like conversion.FeatureClassToFeatureClass is deprecated and transitioned to conversion.ExportFeatures at 3.1&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:10:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265300#M67020</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-03-08T01:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265301#M67021</link>
      <description>&lt;P&gt;My question is the path and name are in one... its looking for 3 parameters&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"P:/Folder/Folder/ConnectionFile.sde/GIS.DBO.FeatureClassName"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;arcpy.conversion.FeatureClassToFeatureClass(inFeatures, outLocation, outFeatureClass&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:11:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265301#M67021</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T01:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265307#M67022</link>
      <description>&lt;P&gt;it would be like this:&lt;/P&gt;&lt;P&gt;outLocation = "P:/Folder/Folder/ConnectionFile.sde"&lt;/P&gt;&lt;P&gt;outFeatureClass = 'FeatureClassName'&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265307#M67022</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-03-08T01:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265564#M67033</link>
      <description>&lt;P&gt;@Anonymous User&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more question... this works in python3.x but what about 2.7.&amp;nbsp; We have not updated our servers and application on out main servers yet and still need to run in py 2.7 for the time being.... Thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcpy.FeatureClassToFeatureClass_conversion(inFeatures, outLocation, outFeatureClass)&lt;/P&gt;&lt;P&gt;OR&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcpy.conversion.FeatureClassToFeatureClass(inFeatures, outLocation, outFeatureClass)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Running from Python 3.7.11 Shell&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NO Errors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Running from Python 2.7.18 Shell&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "C:\Users\xxDesktop\GIS_projects\PythonScripts\ImportData104.py", line 18, in &amp;lt;module&amp;gt;&lt;BR /&gt;copyData()&lt;BR /&gt;File "C:\Users\xxDesktop\GIS_projects\PythonScripts\ImportData104.py", line 13, in copyData&lt;BR /&gt;arcpy.FeatureClassToFeatureClass_conversion(inFeatures, outLocation, outFeatureClass)&lt;BR /&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.8\ArcPy\arcpy\conversion.py", line 1914, in FeatureClassToFeatureClass&lt;BR /&gt;raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Features: Dataset &lt;A href="https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/104" target="_blank" rel="noopener"&gt;https://apps.deq.virginia.gov/arcgis/rest/services/public/EDMA/MapServer/104&lt;/A&gt; does not exist or is not supported&lt;BR /&gt;Failed to execute (FeatureClassToFeatureClass).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 17:21:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265564#M67033</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T17:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265630#M67035</link>
      <description>&lt;P&gt;I suspect the 2.7 doesn't support url's as input...&amp;nbsp; From the docs:&lt;/P&gt;&lt;P&gt;Converts a shapefile, coverage feature class, or geodatabase feature class to a shapefile or geodatabase feature class&lt;/P&gt;&lt;P&gt;vs Pro:&lt;/P&gt;&lt;P&gt;Converts a feature class or &lt;EM&gt;feature layer&lt;/EM&gt; to a feature class&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 18:36:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265630#M67035</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-03-08T18:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265634#M67036</link>
      <description>&lt;P&gt;Per&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/109401"&gt;@AaronCole1&lt;/a&gt;&amp;nbsp;script....&amp;nbsp; &amp;nbsp;So If I create the shapefile like we were doing... what is my mechanism to get those records to a Feature Class in SDE?&amp;nbsp; Delete Rows and Append?&amp;nbsp; something like that?&lt;/P&gt;&lt;P&gt;I tried Copy Management and got this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.Copy_management(in_data, toFeatureClass)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.8\ArcPy\arcpy\management.py", line 4311, in Copy&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;raise e&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ERROR 000979: Cannot copy between different workspaces.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Failed to execute (Copy).&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 18:40:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265634#M67036</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T18:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265649#M67038</link>
      <description>&lt;P&gt;You could try to truncate first, then append.&amp;nbsp; Working in an enterprise database there are often more constraints in terms of permissions, locks, versions, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 18:56:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265649#M67038</guid>
      <dc:creator>AaronCole1</dc:creator>
      <dc:date>2023-03-08T18:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265660#M67039</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/109401"&gt;@AaronCole1&lt;/a&gt;&amp;nbsp; than whats the difference between truncate and delete rows.&lt;/P&gt;&lt;P&gt;Is one faster than the other one?&lt;/P&gt;&lt;P&gt;UPDATE: Never mind:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;&lt;P&gt;&lt;EM&gt;Truncate commands do not use database transactions and are unrecoverable. This improves performance over row-by-row deletion.&lt;/EM&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 08 Mar 2023 19:11:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265660#M67039</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2023-03-08T19:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265840#M67045</link>
      <description>&lt;P&gt;Just something to keep in mind with truncate, it doesn't work on versioned datasets.&lt;/P&gt;&lt;P&gt;If the Featureclass exists in the sde geodatabase, the delete and append method would probably work best (inplace of the truncate) because it will keep the privileges, versioning, etc.,. that are set on that Featureclass.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 00:13:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1265840#M67045</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-03-09T00:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from Open Data</title>
      <link>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1536699#M72800</link>
      <description>&lt;P&gt;Have you had in cases applying this method with a secured map service? I was testing connecting with credential first then running the tool but so far no luck. I will keep testing.&lt;BR /&gt;&lt;BR /&gt;Jared&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 23:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extract-data-from-open-data/m-p/1536699#M72800</guid>
      <dc:creator>jschuckert</dc:creator>
      <dc:date>2024-09-09T23:39:40Z</dc:date>
    </item>
  </channel>
</rss>

