< Back

New-AzureRmHDInsightPigJobDefinition

Tue Jan 29, 2019 9:48 pm

NAME New-AzureRmHDInsightPigJobDefinition



SYNOPSIS

Creates a Pig job object.





SYNTAX

New-AzureRmHDInsightPigJobDefinition [-Arguments <String[]>] [-DefaultProfile <IAzureContextContainer>] [-File <String>] [-Files <String[]>]

[-Query <String>] [-StatusFolder <String>] [<CommonParameters>]





DESCRIPTION

The New-AzureRmHDInsightPigJobDefinition cmdlet defines a Pig job object for use with an Azure HDInsight cluster.





PARAMETERS

-Arguments <String[]>

Specifies an array of arguments for the job. The arguments are passed as command-line arguments to each task.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-File <String>

Specifies the path to a file that contains the query to run. The file must be available on the storage account associated with the cluster.

You can use this parameter instead of the Query parameter.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Files <String[]>

Specifies a collection of files that are associated with a Hive job.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Query <String>

Specifies the Pig query.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-StatusFolder <String>

Specifies the location of the folder that contains standard outputs and error outputs for a job.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightPigJobDefinition







NOTES









Example 1: Create a Pig job definition



PS C:\\># Cluster info

PS C:\\>$clusterName = "your-hadoop-001"

PS C:\\>$clusterCreds = Get-Credential



# Pig job details

PS C:\\>$statusFolder = "tempStatusFolder/"

PS C:\\>$query = "SHOW TABLES"



PS C:\\>New-AzureRmHDInsightPigJobDefinition -StatusFolder $statusFolder `

-Query $query `

| Start-AzureRmHDInsightJob `

-ClusterName $clusterName `

-ClusterCredential $clusterCreds



This command creates a Pig job definition.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... definition

Start-AzureRmHDInsightJob