Skip to main content

spark_job_definition

Creates, updates, deletes, gets or lists a spark_job_definition resource.

Overview

Namespark_job_definition
TypeResource
Idazure.synapse_artifacts.spark_job_definition

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
objectUnmatched properties from the message are deserialized to this collection.
descriptionstringThe description of the Spark job definition.
etagstringResource Etag.
folderobjectThe folder that this Spark job definition is in. If not specified, this Spark job definition will appear at the root level.
jobPropertiesobjectThe properties of the Spark job. Required.
languagestringThe language of the Spark application.
requiredSparkVersionstringThe required Spark version of the application.
targetBigDataPoolobjectBig data pool reference. Required.
targetSparkConfigurationobjectThe spark configuration of the spark job.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_spark_job_definitionselectspark_job_definition_name, endpointIf-None-MatchGets a Spark Job Definition.
get_spark_job_definitions_by_workspaceselectendpointLists spark job definitions.
create_or_update_spark_job_definitioninsertspark_job_definition_name, endpoint, targetBigDataPool, jobPropertiesIf-MatchCreates or updates a Spark Job Definition.
create_or_update_spark_job_definitionreplacespark_job_definition_name, endpoint, targetBigDataPool, jobPropertiesIf-MatchCreates or updates a Spark Job Definition.
delete_spark_job_definitiondeletespark_job_definition_name, endpointDeletes a Spark Job Definition.
execute_spark_job_definitionexecspark_job_definition_name, endpointExecutes the spark job definition.
rename_spark_job_definitionexecspark_job_definition_name, endpointRenames a sparkJobDefinition.
debug_spark_job_definitionexecendpoint, targetBigDataPool, jobPropertiesDebug the spark job definition.

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: )
spark_job_definition_namestringThe spark job definition name. Required.
If-MatchstringETag of the Spark Job Definition entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update. Default value is None.
If-None-MatchstringETag of the Spark Job Definition entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned. Default value is None.

SELECT examples

Gets a Spark Job Definition.

SELECT
id,
name,
,
description,
etag,
folder,
jobProperties,
language,
requiredSparkVersion,
targetBigDataPool,
targetSparkConfiguration,
type
FROM azure.synapse_artifacts.spark_job_definition
WHERE spark_job_definition_name = '{{ spark_job_definition_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND If-None-Match = '{{ If-None-Match }}'
;

INSERT examples

Creates or updates a Spark Job Definition.

INSERT INTO azure.synapse_artifacts.spark_job_definition (
,
description,
targetBigDataPool,
targetSparkConfiguration,
requiredSparkVersion,
language,
jobProperties,
folder,
spark_job_definition_name,
endpoint,
If-Match
)
SELECT
'{{ }}',
'{{ description }}',
'{{ targetBigDataPool }}' /* required */,
'{{ targetSparkConfiguration }}',
'{{ requiredSparkVersion }}',
'{{ language }}',
'{{ jobProperties }}' /* required */,
'{{ folder }}',
'{{ spark_job_definition_name }}',
'{{ endpoint }}',
'{{ If-Match }}'
RETURNING
id,
name,
etag,
properties,
type
;

REPLACE examples

Creates or updates a Spark Job Definition.

REPLACE azure.synapse_artifacts.spark_job_definition
SET
= '{{ }}',
description = '{{ description }}',
targetBigDataPool = '{{ targetBigDataPool }}',
targetSparkConfiguration = '{{ targetSparkConfiguration }}',
requiredSparkVersion = '{{ requiredSparkVersion }}',
language = '{{ language }}',
jobProperties = '{{ jobProperties }}',
folder = '{{ folder }}'
WHERE
spark_job_definition_name = '{{ spark_job_definition_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND targetBigDataPool = '{{ targetBigDataPool }}' --required
AND jobProperties = '{{ jobProperties }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
properties,
type;

DELETE examples

Deletes a Spark Job Definition.

DELETE FROM azure.synapse_artifacts.spark_job_definition
WHERE spark_job_definition_name = '{{ spark_job_definition_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Executes the spark job definition.

EXEC azure.synapse_artifacts.spark_job_definition.execute_spark_job_definition 
@spark_job_definition_name='{{ spark_job_definition_name }}' --required,
@endpoint='{{ endpoint }}' --required
;