Select to view content in your preferred language

GP Service to spatial data from shape file to oracle spatial

3871
1
02-03-2015 03:37 AM
praveennarayandas
Deactivated User

Hi all,

i am able to load the shape files into ArcSDE oracle spatial using below script

for shpFile,oraTable in zip(arrRawFC,arrOracleFC):

        for inFC in arcpy.ListFeatureClasses(shpFile+'*'):

arcpy.AddMessage( 'Appending'+shpFile+ 'to'+'Database Connections/MySDE_dev.sde//'+oraTable)

            try:

arcpy.Append_management(inFC, 'Database Connections/MySDE_dev.sde//'+ oraTable , 'NO_TEST', '', '')

            except Exception as e:

                # If an error occurred, print line number and error message       

                tb = sys.exc_info()[2]

#arcpy.AddMessage("Line {0}".format(tb.tb_lineno))

arcpy.AddMessage(e.message)    

i have published script as GP service and when i am executing it it is tool is executing but no results in oracle table.

can any one is having idea how to load shape files on to oracle spatial on web application.

thanks for help.

best regards,

Praveen

0 Kudos
1 Reply
MahtabAlam1
Frequent Contributor

It doesn't look to be complete script. Are you seeing the gp services log messages when you are calling append ?

I do have experience in uploading data that will be used in gp service. Following is a blog that helped me in understanding.

Uploading client data to perform thematic mapping on the server | ArcGIS Blog

Basically you need to zip your shapefile and upload it then do whatever you want to do with it.