azure.synapse.spark.operations package¶
-
class
azure.synapse.spark.operations.
SparkBatchOperations
(client, config, serializer, deserializer)[source]¶ SparkBatchOperations 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.
-
cancel_spark_batch_job
(batch_id: int, **kwargs: Any) → None[source]¶ Cancels a running spark batch job.
-
create_spark_batch_job
(spark_batch_job_options: ‘models.SparkBatchJobOptions’, detailed: Optional[bool] = None, **kwargs: Any) → ’models.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
-
get_spark_batch_job
(batch_id: int, detailed: Optional[bool] = None, **kwargs: Any) → ’models.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
-
get_spark_batch_jobs
(from_parameter: Optional[int] = None, size: Optional[int] = None, detailed: Optional[bool] = None, **kwargs: Any) → ’models.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.operations.
SparkSessionOperations
(client, config, serializer, deserializer)[source]¶ SparkSessionOperations 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.
-
cancel_spark_session
(session_id: int, **kwargs: Any) → None[source]¶ Cancels a running spark session.
-
cancel_spark_statement
(session_id: int, statement_id: int, **kwargs: Any) → ’models.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
-
create_spark_session
(spark_session_options: ‘models.SparkSessionOptions’, detailed: Optional[bool] = None, **kwargs: Any) → ’models.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
-
create_spark_statement
(session_id: int, spark_statement_options: ‘models.SparkStatementOptions’, **kwargs: Any) → ’models.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
-
get_spark_session
(session_id: int, detailed: Optional[bool] = None, **kwargs: Any) → ’models.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
-
get_spark_sessions
(from_parameter: Optional[int] = None, size: Optional[int] = None, detailed: Optional[bool] = None, **kwargs: Any) → ’models.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
-
get_spark_statement
(session_id: int, statement_id: int, **kwargs: Any) → ’models.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
-
get_spark_statements
(session_id: int, **kwargs: Any) → ’models.SparkStatementCollection’[source]¶ Gets a list of statements within a spark session.
-
reset_spark_session_timeout
(session_id: int, **kwargs: Any) → 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'>¶