Share via


az synapse spark statement

Manage Synapse Spark statements.

Commands

Name Description Type Status
az synapse spark statement cancel

Cancel a Spark statement.

Core GA
az synapse spark statement invoke

Invoke a Spark statement.

Core GA
az synapse spark statement list

List all Spark statements.

Core GA
az synapse spark statement show

Get a Spark statement.

Core GA

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.