azure.synapse.spark.aio.operations_async package¶
-
class
azure.synapse.spark.aio.operations_async.
SparkBatchOperations
(client, config, serializer, deserializer)[source]¶ SparkBatchOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
async
cancel_spark_batch_job
(batch_id: int, **kwargs) → None[source]¶ Cancels a running spark batch job.
-
async
create_spark_batch_job
(spark_batch_job_options: azure.synapse.spark.models._models_py3.SparkBatchJobOptions, detailed: Optional[bool] = None, **kwargs) → azure.synapse.spark.models._models_py3.SparkBatchJob[source]¶ Create new spark batch job.
- Parameters
spark_batch_job_options (SparkBatchJobOptions) – Livy compatible batch job request payload.
detailed (bool) – Optional query param specifying whether detailed response is returned beyond plain livy.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkBatchJob, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
get_spark_batch_job
(batch_id: int, detailed: Optional[bool] = None, **kwargs) → azure.synapse.spark.models._models_py3.SparkBatchJob[source]¶ Gets a single spark batch job.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkBatchJob, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
get_spark_batch_jobs
(from_parameter: Optional[int] = None, size: Optional[int] = None, detailed: Optional[bool] = None, **kwargs) → azure.synapse.spark.models._models_py3.SparkBatchJobCollection[source]¶ List all spark batch jobs which are running under a particular spark pool.
- Parameters
from_parameter (int) – Optional param specifying which index the list should begin from.
size (int) – Optional param specifying the size of the returned list. By default it is 20 and that is the maximum.
detailed (bool) – Optional query param specifying whether detailed response is returned beyond plain livy.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkBatchJobCollection, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
models
= <module 'azure.synapse.spark.models' from '/home/vsts/work/1/s/sdk/synapse/azure-synapse-spark/.tox/sphinx/lib/python3.6/site-packages/azure/synapse/spark/models/__init__.py'>¶
-
class
azure.synapse.spark.aio.operations_async.
SparkSessionOperations
(client, config, serializer, deserializer)[source]¶ SparkSessionOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Variables
models – Alias to model classes used in this operation group.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
async
cancel_spark_session
(session_id: int, **kwargs) → None[source]¶ Cancels a running spark session.
-
async
cancel_spark_statement
(session_id: int, statement_id: int, **kwargs) → azure.synapse.spark.models._models_py3.SparkStatementCancellationResult[source]¶ Kill a statement within a session.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkStatementCancellationResult, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
create_spark_session
(spark_session_options: azure.synapse.spark.models._models_py3.SparkSessionOptions, detailed: Optional[bool] = None, **kwargs) → azure.synapse.spark.models._models_py3.SparkSession[source]¶ Create new spark session.
- Parameters
spark_session_options (SparkSessionOptions) – Livy compatible batch job request payload.
detailed (bool) – Optional query param specifying whether detailed response is returned beyond plain livy.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkSession, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
create_spark_statement
(session_id: int, spark_statement_options: azure.synapse.spark.models._models_py3.SparkStatementOptions, **kwargs) → azure.synapse.spark.models._models_py3.SparkStatement[source]¶ Create statement within a spark session.
- Parameters
session_id (int) – Identifier for the session.
spark_statement_options (SparkStatementOptions) – Livy compatible batch job request payload.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkStatement, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
get_spark_session
(session_id: int, detailed: Optional[bool] = None, **kwargs) → azure.synapse.spark.models._models_py3.SparkSession[source]¶ Gets a single spark session.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkSession, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
get_spark_sessions
(from_parameter: Optional[int] = None, size: Optional[int] = None, detailed: Optional[bool] = None, **kwargs) → azure.synapse.spark.models._models_py3.SparkSessionCollection[source]¶ List all spark sessions which are running under a particular spark pool.
- Parameters
from_parameter (int) – Optional param specifying which index the list should begin from.
size (int) – Optional param specifying the size of the returned list. By default it is 20 and that is the maximum.
detailed (bool) – Optional query param specifying whether detailed response is returned beyond plain livy.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkSessionCollection, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
get_spark_statement
(session_id: int, statement_id: int, **kwargs) → azure.synapse.spark.models._models_py3.SparkStatement[source]¶ Gets a single statement within a spark session.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SparkStatement, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
async
get_spark_statements
(session_id: int, **kwargs) → azure.synapse.spark.models._models_py3.SparkStatementCollection[source]¶ Gets a list of statements within a spark session.
-
async
reset_spark_session_timeout
(session_id: int, **kwargs) → None[source]¶ Sends a keep alive call to the current session to reset the session timeout.
-
models
= <module 'azure.synapse.spark.models' from '/home/vsts/work/1/s/sdk/synapse/azure-synapse-spark/.tox/sphinx/lib/python3.6/site-packages/azure/synapse/spark/models/__init__.py'>¶