SparkBatchOperations Class

SparkBatchOperations async operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Inheritance
builtins.object
SparkBatchOperations

Constructor

SparkBatchOperations(client, config, serializer, deserializer)

Parameters

Name Description
client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

Name Description
models

Alias to model classes used in this operation group.

Methods

create

Create new spark batch job.

delete

Cancels a running spark batch job.

get

Gets a single spark batch job.

list

List all spark batch jobs which are running under a particular spark pool.

create

Create new spark batch job.

async create(workspace_name: str, spark_pool_name: str, livy_request: ExtendedLivyBatchRequest, detailed: bool | None = None, **kwargs) -> ExtendedLivyBatchResponse

Parameters

Name Description
workspace_name
Required
str

The name of the workspace to execute operations on.

spark_pool_name
Required
str

Name of the spark pool. "ondemand" targets the ondemand pool.

livy_request
Required

Livy compatible batch job request payload.

detailed

Optional query param specifying whether detailed response is returned beyond plain livy.

default value: None

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

ExtendedLivyBatchResponse or the result of cls(response)

Exceptions

Type Description

delete

Cancels a running spark batch job.

async delete(workspace_name: str, spark_pool_name: str, batch_id: int, **kwargs) -> None

Parameters

Name Description
workspace_name
Required
str

The name of the workspace to execute operations on.

spark_pool_name
Required
str

Name of the spark pool. "ondemand" targets the ondemand pool.

batch_id
Required
int

Identifier for the batch job.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets a single spark batch job.

async get(workspace_name: str, spark_pool_name: str, batch_id: int, detailed: bool | None = None, **kwargs) -> ExtendedLivyBatchResponse

Parameters

Name Description
workspace_name
Required
str

The name of the workspace to execute operations on.

spark_pool_name
Required
str

Name of the spark pool. "ondemand" targets the ondemand pool.

batch_id
Required
int

Identifier for the batch job.

detailed

Optional query param specifying whether detailed response is returned beyond plain livy.

default value: None

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

ExtendedLivyBatchResponse or the result of cls(response)

Exceptions

Type Description

list

List all spark batch jobs which are running under a particular spark pool.

async list(workspace_name: str, spark_pool_name: str, from_parameter: int | None = None, size: int | None = None, detailed: bool | None = None, **kwargs) -> ExtendedLivyListBatchResponse

Parameters

Name Description
workspace_name
Required
str

The name of the workspace to execute operations on.

spark_pool_name
Required
str

Name of the spark pool. "ondemand" targets the ondemand pool.

from_parameter
int

Optional param specifying which index the list should begin from.

default value: None
size
int

Optional param specifying the size of the returned list. By default it is 20 and that is the maximum.

default value: None
detailed

Optional query param specifying whether detailed response is returned beyond plain livy.

default value: None

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

ExtendedLivyListBatchResponse or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.synapse.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\synapse\\models\\__init__.py'>