Select to view content in your preferred language

Geoprocessing Using Table Data Files

2892
7
05-01-2013 11:02 AM
JayHalligan
Occasional Contributor
I am attempting to use a geoprocessing widget to upload or "append" tables to an existing SDE table, which works fine in desktop.  I can not figure out how to use the upload feature correctly to get the process to run.  I have uploads checked on the gpservice in Server Manager.  When I use the input parameter type="GPDataFile" it fails with Error #1009, if I use type="datafile", it seems to upload but fails to run the process.  Does anyone have any suggestions?

Execution Type: esriExecutionTypeAsynchronous

Parameters:

    Parameter: Input_Datasets
        Data Type: GPMultiValue:GPDataFile
        Display Name Input Datasets
        Direction: esriGPParameterDirectionInput
        Default Value:
        Parameter Type: esriGPParameterTypeRequired
        Category:

    <inputparams>
        <param name="Input_Datasets"
               label="Upload CSV Borings"
               required="true"
               type="GPDataFile"
               visible="true">
        </param>
    </inputparams>
Tags (2)
0 Kudos
7 Replies
Juan_CarlosFranco
Esri Contributor
Multi-value parameters (e.g., GPMultiValue:GPDataFile) are not fully supported by the GeoprocessingWidget. We are working on this for an upcoming release.

Also note that the input param type should be "datafile":
    <inputparams>
        <param name="Input_Datasets"
               label="Upload CSV Borings"
               required="true"
               type="datafile"
               visible="true">
        </param>
    </inputparams>
0 Kudos
JayHalligan
Occasional Contributor
Thanks JC, 
   I already did try with "datafile" and it still throws an error.

Problem
esriJobFailed
Failed

I am not too concerned about the multipart at this point but I would like to get this process running.  Any other thoughts?
0 Kudos
Juan_CarlosFranco
Esri Contributor
The GP task should work if tweaked to accept input parameters of GPDataFile type.

The latest error you're seeing is probably caused by the GP task not receiving the input type it's expecting (i.e., receiving GPDataFile vs. GPMultiValue:GPDataFile).
0 Kudos
ZacharyHart
Honored Contributor
The GP task should work if tweaked to accept input parameters of GPDataFile type.

The latest error you're seeing is probably caused by the GP task not receiving the input type it's expecting (i.e., receiving GPDataFile vs. GPMultiValue:GPDataFile).


Hey there, I just upgraded to 3.3 (thanks for the quick update, although it was fun to get my hands dirty with compiling from the source to get things running), and I too am running into an issue with data tables and the GP widget. My GP service is restricted to text files as an input, and while the GP widget recognizes this as the 'data file' type, but when i run the GP widget in the viewer, it won't allow browsing the local file system/local upload. Do I have to 'trick' it into working by modifying my GP service to use 'data file' instead? If so i'll just have to attempt to restrict my users from using alternate file types through instruction!
0 Kudos
Juan_CarlosFranco
Esri Contributor
The GP widget displays the UI for uploading local files when using a service that supports uploads (10.1+). Otherwise, the default URL input mode is used.

As for restricting files for upload, there is no way to configure this, but it definitely seems feasible and would make sense to support in a future release.
0 Kudos
ZacharyHart
Honored Contributor
Ok, sorry for not being specific, I am using a 10.1 Server, and at 3.2 I was able to upload using the GP service. Turns out that in a rush to republish my updated tool using 3.3 I neglected to check the upload support when publishing...what a rookie mistake.

On your comment however: yes, interesting that the GP service itself is configured to restrict the type to text file, but that is not honored by the widget....at this point i could care less! Live GPS data upload service gets lift-off tomorrow!
0 Kudos
JayHalligan
Occasional Contributor
My problem was solved by deleting the "Multiple Value" Data type input variable in the model and replace it with a single value "Text File" data type.  It ran fine after this change in the rest as well as the viewer. So it does seem like GPMultiValue:GPDataFile was causing the problem.  Thanks
0 Kudos