Edit

Share via


Get-AzSynapseSparkStatement

Gets a Synapse Analytics Spark statement.

Syntax

GetSparkStatementsByIdParameterSet (Default)

Get-AzSynapseSparkStatement
    -WorkspaceName <String>
    -SparkPoolName <String>
    -SessionId <Int32>
    [-LivyId <Int32>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

GetSparkStatementsByParentObjectParameterSet

Get-AzSynapseSparkStatement
    -SessionObject <PSSynapseSparkSession>
    [-LivyId <Int32>]
    [-SessionId <Int32>]
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzSynapseSparkStatement cmdlet gets information about an Azure Synapse Analytics Spark statement.

Examples

Example 1

Get-AzSynapseSparkStatement -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool -SessionId 120

This command gets all the Spark statements under a Spark session.

Example 2

Get-AzSynapseSparkStatement -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool -SessionId 120 -LivyId 0

This command gets the Spark statement with the specified livy ID.

Example 3

$session = Get-AzSynapseSparkSession -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool -LivyId 107
$session | Get-AzSynapseSparkStatement

This command gets all the Spark statements under a Spark session through pipeline.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LivyId

Identifier of Spark statement.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Id

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SessionId

Identifier of Spark session.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetSparkStatementsByIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SessionObject

Spark pool input object, usually passed through the pipeline.

Parameter properties

Type:PSSynapseSparkSession
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetSparkStatementsByParentObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-SparkPoolName

Name of Synapse Spark pool.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetSparkStatementsByIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WorkspaceName

Name of Synapse workspace.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetSparkStatementsByIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSSynapseSparkSession

Outputs

PSSynapseSparkStatement