Skip to main content

import_jobs

Creates, updates, deletes, gets or lists an import_jobs resource.

Overview

Nameimport_jobs
TypeResource
Idazure.digital_twins_core.import_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier of the import job.
createdDateTimestring (date-time)Start time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
errorobjectDetails of the error(s) that occurred executing the import job.
finishedDateTimestring (date-time)End time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
inputBlobUristringThe path to the input Azure storage blob that contains file(s) describing the operations to perform in the job. Required.
lastActionDateTimestring (date-time)Last time service performed any action from the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
outputBlobUristringThe path to the output Azure storage blob that will contain the errors and progress logs of import job. Required.
purgeDateTimestring (date-time)Time at which job will be purged by the service from the system. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
statusstringStatus of the job. Known values are: "notstarted", "running", "failed", "succeeded", "cancelling", and "cancelled".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_idselectid, endpointtraceparent, tracestateRetrieves an import job. Status codes: * 200 OK * 404 Not Found * ImportJobNotFound - The import job was not found.
listselectendpointtraceparent, tracestate, max-items-per-pageRetrieves all import jobs. Status codes: * 200 OK.
deletedeleteid, endpointtraceparent, tracestateDeletes an import job. This is simply used to remove a job id, so it may be reused later. It can not be used to stop entities from being imported. Status codes: * 204 No Content * 400 Bad Request * ValidationFailed - The import job request is not valid.
addexecid, endpoint, inputBlobUri, outputBlobUritraceparent, tracestateCreates an import job. Status codes: * 201 Created * 400 Bad Request * JobLimitReached - The maximum number of import jobs allowed has been reached. * ValidationFailed - The import job request is not valid.
cancelexecid, endpointtraceparent, tracestateCancels an import job that is currently running. Service will stop any import operations triggered by the current import job that are in progress, and go to a cancelled state. Please note that this will leave your instance in an unknown state as there won't be any rollback operation. Status codes: * 200 Request Accepted * 400 Bad Request * ValidationFailed - The import job request is not valid.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme). (default: )
idstringThe id for the import job. The id is unique within the service and case sensitive. Required.
max-items-per-pageinteger
traceparentstring
tracestatestring

SELECT examples

Retrieves an import job. Status codes: * 200 OK * 404 Not Found * ImportJobNotFound - The import job was not found.

SELECT
id,
createdDateTime,
error,
finishedDateTime,
inputBlobUri,
lastActionDateTime,
outputBlobUri,
purgeDateTime,
status
FROM azure.digital_twins_core.import_jobs
WHERE id = '{{ id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
;

DELETE examples

Deletes an import job. This is simply used to remove a job id, so it may be reused later. It can not be used to stop entities from being imported. Status codes: * 204 No Content * 400 Bad Request * ValidationFailed - The import job request is not valid.

DELETE FROM azure.digital_twins_core.import_jobs
WHERE id = '{{ id }}' --required
AND endpoint = '{{ endpoint }}' --required
AND traceparent = '{{ traceparent }}'
AND tracestate = '{{ tracestate }}'
;

Lifecycle Methods

Creates an import job. Status codes: * 201 Created * 400 Bad Request * JobLimitReached - The maximum number of import jobs allowed has been reached. * ValidationFailed - The import job request is not valid.

EXEC azure.digital_twins_core.import_jobs.add 
@id='{{ id }}' --required,
@endpoint='{{ endpoint }}' --required,
@traceparent='{{ traceparent }}',
@tracestate='{{ tracestate }}'
@@json=
'{
"inputBlobUri": "{{ inputBlobUri }}",
"outputBlobUri": "{{ outputBlobUri }}",
"error": "{{ error }}"
}'
;