<?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 Geoprocessing Service not able to add to feature class in SDE in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-not-able-to-add-to-feature/m-p/572804#M18892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a python script that I have published as a geoprocessing service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The python script takes a CSV file and updates a Point Feature Class in Microsoft SQL SDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy, csv, random, time &lt;BR /&gt;arcpy.env.workspace = r"&lt;SPAN&gt;E:\SDECon\CPR.sde&lt;/SPAN&gt;"&lt;BR /&gt;# Read csv file with names&lt;BR /&gt;csvFile = arcpy.GetParameterAsText(0)&lt;BR /&gt;#csvFile = r'E:\SampleDataV1.csv'&lt;BR /&gt;reader = csv.reader(open(csvFile, "rb"), delimiter = ",", skipinitialspace=True)&lt;/P&gt;&lt;P&gt;row_values = []&lt;BR /&gt;for i, line in enumerate(reader):&lt;BR /&gt; print 'line[{}] = {}'.format(i, line)&lt;BR /&gt; print((line[0],line[1]),line[2],line[3])&lt;BR /&gt; row_values.append([(float(line[0]),float(line[1])),line[2],int(line[3])])&lt;BR /&gt;print(row_values)&lt;/P&gt;&lt;P&gt;# # Open an InsertCursor&lt;BR /&gt;cursor = arcpy.da.InsertCursor(r'E:\SDECon\CPR.sde\CPR.DBO.GurDevOfflinePointV1',&lt;BR /&gt; ['SHAPE@XY',"UserIdentify","DateTimeLocation"])&lt;BR /&gt;for row in row_values:&lt;BR /&gt; cursor.insertRow([row[0],row[1],time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(row[2]))])&lt;BR /&gt; print([row[0],row[1],time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(row[2]))])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After publishing this a geoprocessing service I ran it using Web appbuilder geoprocessing widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The service fails I checked the error logs on the service and I get the following info:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error executing tool. OfflineEditingScript Job ID: j43e4134db18346febdcaf33f8d80fc03 : Traceback (most recent call last): File "C:\arcgisserver\directories\arcgissystem\arcgisinput\Gurminder\OfflineEditingScriptV7.GPServer\extracted\v101\offlineediting\pathTracker.py", line 26, in ['SHAPE@XY',"UserIdentify","DateTimeLocation"]) RuntimeError: cannot open 'C:\arcgisserver\directories\arcgissystem\arcgisinput\Gurminder\OfflineEditingScriptV7.GPServer\extracted\v101\CPR.sde\CPR.DBO.GurDevOfflinePointV1' Failed to execute (OfflineEditingScript). Failed to execute (OfflineEditingScript).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like it create a copy of SDE connection file on ArcGIS Server directories. I have made sure that SDE is registered with ArcGIS Server. However even after registereing the feature class it still creates a copy on ArcGIS server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2020 18:22:46 GMT</pubDate>
    <dc:creator>BrentSlone3</dc:creator>
    <dc:date>2020-03-24T18:22:46Z</dc:date>
    <item>
      <title>Geoprocessing Service not able to add to feature class in SDE</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-not-able-to-add-to-feature/m-p/572804#M18892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a python script that I have published as a geoprocessing service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The python script takes a CSV file and updates a Point Feature Class in Microsoft SQL SDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy, csv, random, time &lt;BR /&gt;arcpy.env.workspace = r"&lt;SPAN&gt;E:\SDECon\CPR.sde&lt;/SPAN&gt;"&lt;BR /&gt;# Read csv file with names&lt;BR /&gt;csvFile = arcpy.GetParameterAsText(0)&lt;BR /&gt;#csvFile = r'E:\SampleDataV1.csv'&lt;BR /&gt;reader = csv.reader(open(csvFile, "rb"), delimiter = ",", skipinitialspace=True)&lt;/P&gt;&lt;P&gt;row_values = []&lt;BR /&gt;for i, line in enumerate(reader):&lt;BR /&gt; print 'line[{}] = {}'.format(i, line)&lt;BR /&gt; print((line[0],line[1]),line[2],line[3])&lt;BR /&gt; row_values.append([(float(line[0]),float(line[1])),line[2],int(line[3])])&lt;BR /&gt;print(row_values)&lt;/P&gt;&lt;P&gt;# # Open an InsertCursor&lt;BR /&gt;cursor = arcpy.da.InsertCursor(r'E:\SDECon\CPR.sde\CPR.DBO.GurDevOfflinePointV1',&lt;BR /&gt; ['SHAPE@XY',"UserIdentify","DateTimeLocation"])&lt;BR /&gt;for row in row_values:&lt;BR /&gt; cursor.insertRow([row[0],row[1],time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(row[2]))])&lt;BR /&gt; print([row[0],row[1],time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(row[2]))])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After publishing this a geoprocessing service I ran it using Web appbuilder geoprocessing widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The service fails I checked the error logs on the service and I get the following info:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error executing tool. OfflineEditingScript Job ID: j43e4134db18346febdcaf33f8d80fc03 : Traceback (most recent call last): File "C:\arcgisserver\directories\arcgissystem\arcgisinput\Gurminder\OfflineEditingScriptV7.GPServer\extracted\v101\offlineediting\pathTracker.py", line 26, in ['SHAPE@XY',"UserIdentify","DateTimeLocation"]) RuntimeError: cannot open 'C:\arcgisserver\directories\arcgissystem\arcgisinput\Gurminder\OfflineEditingScriptV7.GPServer\extracted\v101\CPR.sde\CPR.DBO.GurDevOfflinePointV1' Failed to execute (OfflineEditingScript). Failed to execute (OfflineEditingScript).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like it create a copy of SDE connection file on ArcGIS Server directories. I have made sure that SDE is registered with ArcGIS Server. However even after registereing the feature class it still creates a copy on ArcGIS server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 18:22:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-not-able-to-add-to-feature/m-p/572804#M18892</guid>
      <dc:creator>BrentSlone3</dc:creator>
      <dc:date>2020-03-24T18:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Service not able to add to feature class in SDE</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-not-able-to-add-to-feature/m-p/1029712#M25223</link>
      <description>&lt;P&gt;Hi Brent,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having the same issue. I wonder if you have a solution that you can share?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jennifer&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 19:48:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-not-able-to-add-to-feature/m-p/1029712#M25223</guid>
      <dc:creator>Strahanjen</dc:creator>
      <dc:date>2021-02-23T19:48:57Z</dc:date>
    </item>
  </channel>
</rss>

