Copy To Data Store

Copy To Data Store

Copy To Data Store takes an input layer and copies it to a data store. Data is copied to ArcGIS Data Store and is stored in your relational or spatiotemporal data store.

For example, you could copy features that are stored in a big data file share to a relational data store and specify that only features within the current map extent be copied. This would create a hosted feature service with only those features that were within the specified map extent.

Request URL

http://<analysis url>/CopyToDataStore/submitJob

Request parameters

Parameter

Description

inputLayer

(Required)

The layer or table that will be copied.

Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:

  • A URL to a feature service layer with an optional filter to select specific features
  • A URL to a big data catalog service layer with an optional filter to select specific features
  • A feature collection

Examples:

  • {"url": <feature service layer url>, "filter": <where clause>}
  • {"layerDefinition": {}, "featureSet": {}, "filter": <where clause>}

outputName

(Required)

The task will create a feature service of the results. You define the name of the service.

Example: "outputName" : "myOutput"

context

The context parameter contains additional settings that affect task execution. For this task, there are the following four settings:

  • Extent (extent)—A bounding box that defines the analysis area. Only those features that intersect the bounding box will be analyzed.
  • Processing spatial reference (processSR)—Features will be projected into this coordinate system for analysis. It is not recommended to use both processSR and outSR.
  • Output spatial reference (outSR)—Features will be projected into this coordinate system after analysis to be saved. The output spatial reference for the spatiotemporal big data store is always WGS84. It is not recommended to use both processSR and outSR.
  • Data store (dataStore)—Results will be saved to the specified data store. The default is the spatiotemporal big data store.

f

The response format. The default response format is html.

Values: html | json

Response

When you submit a request, the service assigns a unique job ID for the transaction.

Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}

After the initial request is submitted, you can use jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

http://<analysis url>/CopyToDataStore/jobs/<jobId>

Accessing results

When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:

http://<analysis url>/CopyToDataStore/jobs/<jobId>/results/output?token=<your token>&f=json

Parameter

Description

output

The output parameter will contain the copied features.

Request example:
{"url": 
"http://<analysis url>/CopyToDataStore/jobs/<jobId>/results/output"}

The result has properties for parameter name, data type, and value. The contents of value depend on the outputName parameter provided in the initial request. The value contains the URL of the feature service layer.

{
"paramName":"output", 
"dataType":"GPRecordSet",
"value":{"url":"<hosted featureservice layer url>"}
}

See Feature output for more information about how the result layer is accessed.

10/6/2017