共用方式為


New-AzHDInsightPigJobDefinition

建立 Pig 作業物件。

語法

New-AzHDInsightPigJobDefinition
   [-Arguments <String[]>]
   [-Files <String[]>]
   [-StatusFolder <String>]
   [-File <String>]
   [-Query <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

New-AzHDInsightPigJobDefinition Cmdlet 會定義 Pig 作業物件,以搭配 Azure HDInsight 叢集使用。

範例

範例 1:建立 Pig 作業定義

# Cluster info
$clusterName = "your-hadoop-001"
$clusterCreds = Get-Credential

# Pig job details
$statusFolder = "tempStatusFolder/"
$query = "SHOW TABLES"

New-AzHDInsightPigJobDefinition -StatusFolder $statusFolder `
            -Query $query `
        | Start-AzHDInsightJob `
            -ClusterName $clusterName `
            -ClusterCredential $clusterCreds

此命令會建立 Pig 作業定義。

參數

-Arguments

指定作業的自變數陣列。 自變數會以命令行自變數的形式傳遞至每個工作。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-File

指定要執行之查詢的檔案路徑。 檔案必須可在與叢集相關聯的記憶體帳戶上使用。 您可以使用此參數,而不是 Query 參數。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Files

指定與Hive作業相關聯的檔案集合。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Query

指定 Pig 查詢。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-StatusFolder

指定資料夾的位置,其中包含作業的標準輸出和錯誤輸出。

類型:String
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

None

輸出

AzureHDInsightPigJobDefinition