<?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 output File(csv) access in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-output-file-csv-access/m-p/1140155#M26156</link>
    <description>&lt;P&gt;Hello all,&amp;nbsp;&amp;nbsp; I have created a Geoprocessing Service(clip raster, export xyz values to .csv file) for a Webapp.&amp;nbsp; the tool runs and actually outputs the clipped raster(tif) and the .csv file to the Server scratch locations:&lt;/P&gt;&lt;P&gt;\arcgisjobs\ngs\cliprasterxyz_b_gpserver\xxjobidxx\scratch&lt;/P&gt;&lt;P&gt;REST&lt;/P&gt;&lt;P data-unlink="true"&gt;/server/rest/directories/arcgisjobs/ngs/cliprasterxyz_b_gpserver/xxjobidxx/scratch&amp;nbsp;&lt;/P&gt;&lt;P&gt;/server/rest/services/NGS/ClipRasterXYZ_b/GPServer/ClipRasterXYZ/jobs/xxjobidxx/results/Table_xyz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So,&amp;nbsp; the files exist, i see them.&amp;nbsp;&amp;nbsp; I am able to add the raster to the webmap using Javascript "getResultMapImageLayer",&amp;nbsp; BUT i cannot seem to read the contents of the .csv file using "getResultData"?&lt;/P&gt;&lt;P&gt;the DataType of the output Parameter is "File".&lt;/P&gt;&lt;P&gt;here are some JS snippets - the console shows empty or 'undefined'..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var params = {&lt;BR /&gt;Clip_input: featureSet,&lt;BR /&gt;//Table_xyz: "Table_xyz.csv",&lt;BR /&gt;};&lt;/P&gt;&lt;P data-unlink="true"&gt;var geoprocessor = new Geoprocessor("https://server_name/server/rest/services/NGS/ClipRasterXYZ_b/GPServer/ClipRasterXYZ&amp;nbsp;");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;geoprocessor.submitJob(params).then(function(jobInfo) {&lt;BR /&gt;let jobid = jobInfo.jobId;&lt;/P&gt;&lt;P&gt;let options = {&lt;BR /&gt;interval: 2500,&lt;BR /&gt;statusCallback: function(j) {&lt;BR /&gt;console.log("Job Status: ", j.jobStatus);&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;geoprocessor.waitForJobCompletion(jobid, options).then(function() {&lt;BR /&gt;geoprocessor.getResultMapImageLayer(jobInfo.jobId).then(function(layer){&lt;BR /&gt;view.map.add(layer);&lt;BR /&gt;console.log("layer_",layer.url);&lt;/P&gt;&lt;P&gt;geoprocessor.getResultData(jobInfo.jobId, "Table_xyz").then(function(table){&lt;BR /&gt;//makePlotly(r)&lt;BR /&gt;console.log("table_", table.url);&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*BONUS question!?&amp;nbsp;&amp;nbsp;&amp;nbsp; why are there 2 REST service URLs as i listed above?&amp;nbsp; which url should i be using??&lt;/P&gt;&lt;P&gt;cheers!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Feb 2022 02:05:40 GMT</pubDate>
    <dc:creator>Paco</dc:creator>
    <dc:date>2022-02-03T02:05:40Z</dc:date>
    <item>
      <title>Geoprocessing Service output File(csv) access</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-output-file-csv-access/m-p/1140155#M26156</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&amp;nbsp; I have created a Geoprocessing Service(clip raster, export xyz values to .csv file) for a Webapp.&amp;nbsp; the tool runs and actually outputs the clipped raster(tif) and the .csv file to the Server scratch locations:&lt;/P&gt;&lt;P&gt;\arcgisjobs\ngs\cliprasterxyz_b_gpserver\xxjobidxx\scratch&lt;/P&gt;&lt;P&gt;REST&lt;/P&gt;&lt;P data-unlink="true"&gt;/server/rest/directories/arcgisjobs/ngs/cliprasterxyz_b_gpserver/xxjobidxx/scratch&amp;nbsp;&lt;/P&gt;&lt;P&gt;/server/rest/services/NGS/ClipRasterXYZ_b/GPServer/ClipRasterXYZ/jobs/xxjobidxx/results/Table_xyz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So,&amp;nbsp; the files exist, i see them.&amp;nbsp;&amp;nbsp; I am able to add the raster to the webmap using Javascript "getResultMapImageLayer",&amp;nbsp; BUT i cannot seem to read the contents of the .csv file using "getResultData"?&lt;/P&gt;&lt;P&gt;the DataType of the output Parameter is "File".&lt;/P&gt;&lt;P&gt;here are some JS snippets - the console shows empty or 'undefined'..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var params = {&lt;BR /&gt;Clip_input: featureSet,&lt;BR /&gt;//Table_xyz: "Table_xyz.csv",&lt;BR /&gt;};&lt;/P&gt;&lt;P data-unlink="true"&gt;var geoprocessor = new Geoprocessor("https://server_name/server/rest/services/NGS/ClipRasterXYZ_b/GPServer/ClipRasterXYZ&amp;nbsp;");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;geoprocessor.submitJob(params).then(function(jobInfo) {&lt;BR /&gt;let jobid = jobInfo.jobId;&lt;/P&gt;&lt;P&gt;let options = {&lt;BR /&gt;interval: 2500,&lt;BR /&gt;statusCallback: function(j) {&lt;BR /&gt;console.log("Job Status: ", j.jobStatus);&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;geoprocessor.waitForJobCompletion(jobid, options).then(function() {&lt;BR /&gt;geoprocessor.getResultMapImageLayer(jobInfo.jobId).then(function(layer){&lt;BR /&gt;view.map.add(layer);&lt;BR /&gt;console.log("layer_",layer.url);&lt;/P&gt;&lt;P&gt;geoprocessor.getResultData(jobInfo.jobId, "Table_xyz").then(function(table){&lt;BR /&gt;//makePlotly(r)&lt;BR /&gt;console.log("table_", table.url);&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*BONUS question!?&amp;nbsp;&amp;nbsp;&amp;nbsp; why are there 2 REST service URLs as i listed above?&amp;nbsp; which url should i be using??&lt;/P&gt;&lt;P&gt;cheers!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 02:05:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-service-output-file-csv-access/m-p/1140155#M26156</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2022-02-03T02:05:40Z</dc:date>
    </item>
  </channel>
</rss>

