az synapse spark statement

Manage Synapse Spark statements.

Commands

az synapse spark statement cancel

Cancel a Spark statement.

az synapse spark statement invoke

Invoke a Spark statement.

az synapse spark statement list

List all Spark statements.

az synapse spark statement show

Get a Spark statement.

az synapse spark statement cancel

Cancel a Spark statement.

az synapse spark statement cancel --livy-id
                                  --session-id
                                  --spark-pool-name
                                  --workspace-name
                                  [--yes]

Examples

Cancel a Spark statement.

az synapse spark statement cancel --livy-id 1 --session-id 11 --workspace-name testsynapseworkspace \
--spark-pool-name testsparkpool

Required Parameters

--livy-id

The id of the statement.

--session-id

The id of Spark session.

--spark-pool-name

The name of the Spark pool.

--workspace-name

The name of the workspace.

Optional Parameters

--yes -y

Do not prompt for confirmation.

az synapse spark statement invoke

Invoke a Spark statement.

az synapse spark statement invoke --code
                                  --language {CSharp, PySpark, Python, SQL, Scala, Spark, SparkDotNet}
                                  --session-id
                                  --spark-pool-name
                                  --workspace-name

Examples

Invoke a Spark statement.

az synapse spark statement invoke --session-id 1 --workspace-name testsynapseworkspace \
--spark-pool-name testsparkpool --code "print('hello, Azure CLI')" --language pyspark

Submit a Spark statement by reading code content from file.

az synapse spark statement invoke --session-id 1 --workspace-name testsynapseworkspace \
--spark-pool-name testsparkpool --code @file-path --language pyspark

Required Parameters

--code

The code of Spark statement. This is either the code contents or use @<file path> to load the content from a file.

--language

The language of Spark statement.

accepted values: CSharp, PySpark, Python, SQL, Scala, Spark, SparkDotNet
--session-id

The id of Spark session.

--spark-pool-name

The name of the Spark pool.

--workspace-name

The name of the workspace.

az synapse spark statement list

List all Spark statements.

az synapse spark statement list --session-id
                                --spark-pool-name
                                --workspace-name

Examples

List all Spark statements.

az synapse spark statement list --session-id 11 --workspace-name testsynapseworkspace \
--spark-pool-name testsparkpool

Required Parameters

--session-id

The id of Spark session.

--spark-pool-name

The name of the Spark pool.

--workspace-name

The name of the workspace.

az synapse spark statement show

Get a Spark statement.

az synapse spark statement show --livy-id
                                --session-id
                                --spark-pool-name
                                --workspace-name

Examples

Get a Spark statement.

az synapse spark statement show --livy-id 1 --session-id 11 --workspace-name testsynapseworkspace \
--spark-pool-name testsparkpool

Required Parameters

--livy-id

The id of the statement.

--session-id

The id of Spark session.

--spark-pool-name

The name of the Spark pool.

--workspace-name

The name of the workspace.