<?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: Zip File to GDB Service in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585859#M19366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Hi&amp;nbsp; &lt;BR /&gt;I tested your code, but it return this error:&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;IndentationError: unindent does not match any outer indentation level &lt;/STRONG&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;How should I set script input and output parameters?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just be sure to check your python code to make sure none of the lines are wrapping on you. Does it say what line the indentation error is on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is one input parameter scripted in this sample. infile = arcpy.GetParameterAsText(0). If you need more you can just take a similar appraoch.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2013 11:48:54 GMT</pubDate>
    <dc:creator>BrianLeroux</dc:creator>
    <dc:date>2013-02-20T11:48:54Z</dc:date>
    <item>
      <title>Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585850#M19357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to create a service that allows a user to upload a zip file that contains a shape file, unzip it, and finally append to an existing GDB Feature Class. The fields in the shape file do not match the FC so I need to performa field mapping. However, since the input is a zip file I do not have the capabilty to set up the field mapping in the model. So when I run this it adds the elements of the shape file but all the attributes are blank because the missing mapping. Is there any way around this? [ATTACH=CONFIG]19948[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 17:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585850#M19357</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2012-12-14T17:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585851#M19358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The only way I can think of is to have the user supply the field mapping; they'll have to give you the name of a field on the shapefile and the corresponding field on your output FC.&amp;nbsp; You'll then have to create your own field mapping object in a script to use in the append tool.&amp;nbsp; Another way is to force your user to rename their fields to known names/types.&amp;nbsp; There are no easy solutions to this I'm afraid.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 02:10:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585851#M19358</guid>
      <dc:creator>DaleHoneycutt</dc:creator>
      <dc:date>2012-12-18T02:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585852#M19359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. i was able to get this working by creating the mapping in a script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 Create FieldMappings object and load the target dataset
#
&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings = arcpy.FieldMappings()
&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.addTable(WildFire_Table_Target)

&amp;nbsp;&amp;nbsp;&amp;nbsp; inputfields = [field.name for field in arcpy.ListFields(shpPath) if not field.required]
&amp;nbsp;&amp;nbsp;&amp;nbsp; for inputfield in inputfields:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Iterate through each FieldMap in the FieldMappings
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(fieldmappings.fieldCount):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmap = fieldmappings.getFieldMap(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #arcpy.AddMessage(fieldmap.getInputFieldName(0))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # If the field name from the target dataset matches to a validated input field name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fieldmap.getInputFieldName(0) == inputfield.replace("", ""):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Add the input field to the FieldMap and replace the old FieldMap with the new
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmap.addInputField(shpPath, inputfield)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.replaceFieldMap(i, fieldmap)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:12:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585852#M19359</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2021-12-12T01:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585853#M19360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Brian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create a similar geoprocessing service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I'm currently blocked in the upload part.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I reuse the uploaded file in the GPModel or Python script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I have to build on my own the path the the uploaded file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on 10.1, so my uploaded file is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://localhost:6080/arcgis/rest/services/UploadTest/GPServer/uploads/i83fa38d5-69e8-40c0-bd9c-30beb643e522"&gt;http://localhost:6080/arcgis/rest/services/UploadTest/GPServer/uploads/i83fa38d5-69e8-40c0-bd9c-30beb643e522&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; C:\arcgisserver\directories\arcgissystem\arcgisuploads\services\ListVersions2.GPServer\i83fa38d5-69e8-40c0-bd9c-30beb643e522&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please share that part of your code with me or give me some hints?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 03:38:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585853#M19360</guid>
      <dc:creator>TomSchuller</dc:creator>
      <dc:date>2012-12-27T03:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585854#M19361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tom,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a little stuck on authentication issues with the upload protion but I have some sample Siverlight code to use an uploaded file in a geoprocessing tool. You will see I have an ItemID hard coded in for now as I am not able to get the ItemID results from the file upload in silverlight. You need to pass the ItemID of the uploaded file to the geoprocessing task. I got the hang of it by using the rest endpoint to upload files and pass to the GP Service. You can use fiddler to see what is happening during each step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Geoprocessor geoprocessorTask = new Geoprocessor("http://mygisserver/arcgis/rest/services/GPTools/WildfireUpload/GPServer/ZipImportTest");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessorTask.ExecuteCompleted += GeoprocessorTask_ExecuteCompleted;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessorTask.Failed += GeoprocessorTask_Failed;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;GPParameter&amp;gt; parameters = new List&amp;lt;GPParameter&amp;gt;();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.Add(new GPItemID("Input_File", "iec5a4db4-33c9-40b9-ab82-cd27ecef279f"));

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //http://gis/arcgis/rest/services/GPTools/WildfireUpload/GPServer/uploads/iec5a4db4-33c9-40b9-ab82-cd27ecef279f old file link
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geoprocessorTask.ExecuteAsync(parameters);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:12:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585854#M19361</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2021-12-12T01:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585855#M19362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Brian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the quick answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not yet on the client side.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is the server side:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no idea how I can access the uploaded file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you share your unzip model specially the "unzipfile" script part?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Which parameter type does your "ZIP-Input" have?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 11:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585855#M19362</guid>
      <dc:creator>TomSchuller</dc:creator>
      <dc:date>2012-12-27T11:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585856#M19363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry I got ahead of you there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Because I needed to perform the field mapping on the fly i switched from using a model to using a python script. The input parameter type is going to be "File" in any case. In the script below, "infile = arcpy.GetParameterAsText(0)" is going to get the input file as a File type parameter. Then you can use the file as you please.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will see when you run this in desktop you have a file browser that you can use to browse to a file of your choice. Once you get that to run succesfully you can publish as a service. With the service you will need to get the itemID of the uploaded file and use that as an input parameter like itemID:"i83fa38d5-69e8-40c0-bd9c-30beb643e522".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy, os, zipfile&amp;nbsp; infile = arcpy.GetParameterAsText(0) outpath, outfileext = os.path.splitext(infile) filename = outpath.split('\\')[-1]&amp;nbsp; try: &amp;nbsp;&amp;nbsp;&amp;nbsp; # unzip file &amp;nbsp;&amp;nbsp;&amp;nbsp; fireZip = zipfile.ZipFile(infile, 'r') &amp;nbsp;&amp;nbsp;&amp;nbsp; fireZip.extractall(outpath) &amp;nbsp;&amp;nbsp;&amp;nbsp; fireZip.close() &amp;nbsp;&amp;nbsp;&amp;nbsp; shpPath = outpath + "\\" + filename + ".shp" &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Finished unzipping file.")&amp;nbsp; # Local variables: &amp;nbsp;&amp;nbsp;&amp;nbsp; WildFire_Table_Target = "Database Connections\\SQL_DB(TEST Server).sde\\ArcSDE.dbo.WILDFIREPERIM"&amp;nbsp; # Create FieldMappings object and load the target dataset&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings = arcpy.FieldMappings() &amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.addTable(WildFire_Table_Target)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; inputfields = [field.name for field in arcpy.ListFields(shpPath) if not field.required] &amp;nbsp;&amp;nbsp;&amp;nbsp; for inputfield in inputfields: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Iterate through each FieldMap in the FieldMappings &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(fieldmappings.fieldCount): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmap = fieldmappings.getFieldMap(i) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #arcpy.AddMessage(fieldmap.getInputFieldName(0)) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # If the field name from the target dataset matches to a validated input field name &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fieldmap.getInputFieldName(0) == inputfield.replace("", ""): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Add the input field to the FieldMap and replace the old FieldMap with the new &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmap.addInputField(shpPath, inputfield) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.replaceFieldMap(i, fieldmap) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Process: Append &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)&amp;nbsp; except Exception as e: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print e.message &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(e.message)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 11:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585856#M19363</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2012-12-27T11:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585857#M19364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;got it running.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For GPDatafile parameter, I have to indicate this json representation like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;{"itemID":"i80dfa12f-52ed-4841-94ff-37f9c3f5dd6f"}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Tom&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 16:38:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585857#M19364</guid>
      <dc:creator>TomSchuller</dc:creator>
      <dc:date>2012-12-27T16:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585858#M19365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Sorry I got ahead of you there.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;Because I needed to perform the field mapping on the fly i switched from using a model to using a python script. The input parameter type is going to be "File" in any case. In the script below, "infile = arcpy.GetParameterAsText(0)" is going to get the input file as a File type parameter. Then you can use the file as you please.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;You will see when you run this in desktop you have a file browser that you can use to browse to a file of your choice. Once you get that to run succesfully you can publish as a service. With the service you will need to get the itemID of the uploaded file and use that as an input parameter like itemID:"i83fa38d5-69e8-40c0-bd9c-30beb643e522".&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy, os, zipfile

infile = arcpy.GetParameterAsText(0)
outpath, outfileext = os.path.splitext(infile)
filename = outpath.split('\\')[-1]

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # unzip file
&amp;nbsp;&amp;nbsp;&amp;nbsp; fireZip = zipfile.ZipFile(infile, 'r')
&amp;nbsp;&amp;nbsp;&amp;nbsp; fireZip.extractall(outpath)
&amp;nbsp;&amp;nbsp;&amp;nbsp; fireZip.close()
&amp;nbsp;&amp;nbsp;&amp;nbsp; shpPath = outpath + "\\" + filename + ".shp"
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Finished unzipping file.")

# Local variables:
&amp;nbsp;&amp;nbsp;&amp;nbsp; WildFire_Table_Target = "Database Connections\\SQL_DB(TEST Server).sde\\ArcSDE.dbo.WILDFIREPERIM"

# Create FieldMappings object and load the target dataset

&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings = arcpy.FieldMappings()
&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.addTable(WildFire_Table_Target)

&amp;nbsp;&amp;nbsp;&amp;nbsp; inputfields = [field.name for field in arcpy.ListFields(shpPath) if not field.required]
&amp;nbsp;&amp;nbsp;&amp;nbsp; for inputfield in inputfields:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Iterate through each FieldMap in the FieldMappings
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i in range(fieldmappings.fieldCount):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmap = fieldmappings.getFieldMap(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #arcpy.AddMessage(fieldmap.getInputFieldName(0))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # If the field name from the target dataset matches to a validated input field name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fieldmap.getInputFieldName(0) == inputfield.replace("", ""):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Add the input field to the FieldMap and replace the old FieldMap with the new
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmap.addInputField(shpPath, inputfield)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.replaceFieldMap(i, fieldmap)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
# Process: Append
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)

except Exception as e:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print e.message
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(e.message)
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested your code, but it return this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;IndentationError: unindent does not match any outer indentation level &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How should I set script input and output parameters?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:12:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585858#M19365</guid>
      <dc:creator>meriyalootka</dc:creator>
      <dc:date>2021-12-12T01:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585859#M19366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Hi&amp;nbsp; &lt;BR /&gt;I tested your code, but it return this error:&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;IndentationError: unindent does not match any outer indentation level &lt;/STRONG&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;How should I set script input and output parameters?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just be sure to check your python code to make sure none of the lines are wrapping on you. Does it say what line the indentation error is on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is one input parameter scripted in this sample. infile = arcpy.GetParameterAsText(0). If you need more you can just take a similar appraoch.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 11:48:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585859#M19366</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2013-02-20T11:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585860#M19367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just be sure to check your python code to make sure none of the lines are wrapping on you. Does it say what line the indentation error is on?&lt;BR /&gt;&lt;BR /&gt;There is one input parameter scripted in this sample. infile = arcpy.GetParameterAsText(0). If you need more you can just take a similar appraoch.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The error is for Line 41.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 03:40:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585860#M19367</guid>
      <dc:creator>meriyalootka</dc:creator>
      <dc:date>2013-02-21T03:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585861#M19368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The error is for Line 41.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not exactly sure what your line 41 would be. i would assume you changed the code as least a little bit so my line 41 is not the same as yours. If you can post your code and state the text of the line that is giving you issues I can see if I can identify the issue. When posting your code make sure it posts with the correct indents and line breaks or it could make it look like you have more problems that aren;t necesarily in your code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 11:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585861#M19368</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2013-02-21T11:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585862#M19369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I am not exactly sure what your line 41 would be. i would assume you changed the code as least a little bit so my line 41 is not the same as yours. If you can post your code and state the text of the line that is giving you issues I can see if I can identify the issue. When posting your code make sure it posts with the correct indents and line breaks or it could make it look like you have more problems that aren;t necesarily in your code.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;STRONG&gt; &lt;BR /&gt;Hi&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess the error related to this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did not change your code, I got it from your answer to TOM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wonder if you would mind to email your model (&lt;/SPAN&gt;&lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;meriyaloot@gmail.com&lt;/STRONG&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;regards&lt;/STRONG&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 19:24:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585862#M19369</guid>
      <dc:creator>meriyalootka</dc:creator>
      <dc:date>2013-02-21T19:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585863#M19370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Honestly it is probably just an issue with the indentation due to copying and pasting. I would just go though and make sure everything is indented properly. Using a program like notepad++ will make it easier to spot issues. When I copied my code below into NP++ you can see that line is indented too much as well as 2 other below it. Just delete the white space before that following 3 lines and tab them each over 1 time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print e.message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddError(e.message)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 11:53:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585863#M19370</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2013-02-22T11:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585864#M19371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Honestly it is probably just an issue with the indentation due to copying and pasting. I would just go though and make sure everything is indented properly. Using a program like notepad++ will make it easier to spot issues. When I copied my code below into NP++ you can see that line is indented too much as well as 2 other below it. Just delete the white space before that following 3 lines and tab them each over 1 time.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)&amp;nbsp; &lt;BR /&gt;print e.message&amp;nbsp; &lt;BR /&gt;arcpy.AddError(e.message)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed it with your solution and it return this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SyntaxError: invalid syntax&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG style="color: &amp;quot;#FF0000&amp;quot;;"&gt;This is my new code:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy, os, zipfile&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;infile = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outpath, outfileext = os.path.splitext(infile)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;filename = outpath.split('\\')[-1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # unzip file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fireZip = zipfile.ZipFile(infile, 'r')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fireZip.extractall(outpath)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fireZip.close()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; shpPath = outpath + "\\" + filename + ".shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.AddMessage("Finished unzipping file.")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Local variables:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; WildFire_Table_Target = "Database Connections\\SQL_DB(ks204060).sde\\ArcSDE.dbo.gis"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create FieldMappings object and load the target dataset&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; fieldmappings = arcpy.FieldMappings()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fieldmappings.addTable(WildFire_Table_Target)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; inputfields = [field.name for field in arcpy.ListFields(shpPath) if not field.required]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; for inputfield in inputfields:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # Iterate through each FieldMap in the FieldMappings&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; for i in range(fieldmappings.fieldCount):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fieldmap = fieldmappings.getFieldMap(i)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #arcpy.AddMessage(fieldmap.getInputFieldName(0))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # If the field name from the target dataset matches to a validated input field name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if fieldmap.getInputFieldName(0) == inputfield.replace("", ""):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; # Add the input field to the FieldMap and replace the old FieldMap with the new&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fieldmap.addInputField(shpPath, inputfield)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fieldmappings.replaceFieldMap(i, fieldmap)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; break&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Append&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print e.message&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddError(e.message)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 13:28:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585864#M19371</guid>
      <dc:creator>meriyalootka</dc:creator>
      <dc:date>2013-02-22T13:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585865#M19372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are going to have to post your code to this thread using code blocks. Without that I will not be able to properly view your code with the correct indenting.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2013 17:43:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585865#M19372</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2013-02-22T17:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585866#M19373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You are going to have to post your code to this thread using code blocks. Without that I will not be able to properly view your code with the correct indenting.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I attached pyton script. please help me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Feb 2013 04:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585866#M19373</guid>
      <dc:creator>meriyalootka</dc:creator>
      <dc:date>2013-02-23T04:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585867#M19374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I attached pyton script. please help me.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;The last few statements you have a incorrect. You need to use with the appropriate indentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# Process: Append
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)

except Exception as e:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print e.message
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(e.message)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:12:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585867#M19374</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2021-12-12T01:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585868#M19375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The last few statements you have a incorrect. You need to use with the appropriate indentation.&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# Process: Append
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(shpPath, WildFire_Table_Target, "NO_TEST", fieldmappings)

except Exception as e:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print e.message
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(e.message)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested your code, but it return this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IndentationError: unindent does not match any outer indentation level (import_zip_91.py, line 40)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is appropriate indentation?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help me more. Is it possible to send me your model or your code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:12:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585868#M19375</guid>
      <dc:creator>meriyalootka</dc:creator>
      <dc:date>2021-12-12T01:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Zip File to GDB Service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585869#M19376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi&lt;BR /&gt;I tested your code, but it return this error:&lt;BR /&gt;IndentationError: unindent does not match any outer indentation level (import_zip_91.py, line 40)&lt;BR /&gt;&lt;BR /&gt;What is appropriate indentation?&lt;BR /&gt;Please help me more. Is it possible to send me your model or your code?&lt;BR /&gt;Regards&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is pretty simple at this point. You just need to make sure your indentation is correct on those lines that I posted last. Delete the white space before each line so they are not indented and then tab each line over 1 time. The only exception is "except Exception as e:": should not be indented at all.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 11:23:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/zip-file-to-gdb-service/m-p/585869#M19376</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2013-02-26T11:23:51Z</dc:date>
    </item>
  </channel>
</rss>

