Invoke-AzSynapseSparkStatement
Memanggil pernyataan Synapse Analytics Spark.
Sintaks
Invoke-AzSynapseSparkStatement
-WorkspaceName <String>
-SparkPoolName <String>
-Language <String>
-SessionId <Int32>
-FilePath <String>
[-Response]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzSynapseSparkStatement
-WorkspaceName <String>
-SparkPoolName <String>
-Language <String>
-SessionId <Int32>
-Code <String>
[-Response]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzSynapseSparkStatement
-Language <String>
-SessionObject <PSSynapseSparkSession>
[-SessionId <Int32>]
-Code <String>
[-Response]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzSynapseSparkStatement
-Language <String>
-SessionObject <PSSynapseSparkSession>
[-SessionId <Int32>]
-FilePath <String>
[-Response]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Cmdlet Invoke-AzSynapseSparkStatement memanggil pernyataan Synapse Analytics Spark.
Contoh
Contoh 1
$session = Start-AzSynapseSparkSession -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool -Name ContosoSessionName -ExecutorCount 3 -ExecutorSize Small
$session.Language = 'Spark'
$session | Invoke-AzSynapseSparkStatement -Code 'print("Hello world\n")'
Perintah ini memulai sesi Spark lalu memanggil pernyataan Spark sebaris melalui alur.
Contoh 2
Invoke-AzSynapseSparkStatement -SessionId 324 -Language 'Spark' -Code 'print("Hello world\n")'
Perintah ini memulai sesi Spark lalu memanggil pernyataan Spark sebaris.
Contoh 3
$session = Start-AzSynapseSparkSession -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool -Name ContosoSessionName -ExecutorCount 3 -ExecutorSize Small
$session.Language = 'Spark'
$session | Invoke-AzSynapseSparkStatement -FilePath 'C:\path\to\code.sc'
Perintah ini memulai sesi Spark lalu memanggil pernyataan Spark dalam file.
Parameter
-AsJob
Jalankan cmdlet di latar belakang
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Code
Kode eksekusi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Confirm
Meminta Anda mengonfirmasi sebelum menjalankan cmdlet.
Jenis: | SwitchParameter |
Alias: | cf |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DefaultProfile
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan Azure.
Jenis: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-FilePath
Menentukan jalur file lokal yang berisi kode eksekusi.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Language
Bahasa kode eksekusi.
Jenis: | String |
Nilai yang diterima: | Spark, Scala, PySpark, Python, SparkDotNet, CSharp, SQL, Spark, Scala, PySpark, Python, SparkDotNet, CSharp, SQL |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Response
Menunjukkan respons penuh harus dikembalikan.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SessionId
Pengidentifikasi sesi Spark.
Jenis: | Int32 |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SessionObject
Objek input sesi Spark, biasanya melewati alur.
Jenis: | PSSynapseSparkSession |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-SparkPoolName
Nama kumpulan Synapse Spark.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-WhatIf
Menunjukkan apa yang akan terjadi jika cmdlet berjalan. Cmdlet tidak dijalankan.
Jenis: | SwitchParameter |
Alias: | wi |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-WorkspaceName
Nama ruang kerja Synapse.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |