New-​Azure​HD​Insight​Hive​Job​Definition

Defines a new Hive job for an HDInsight service.

Syntax

New-AzureHDInsightHiveJobDefinition
   [-Arguments <String[]>]
   [-Defines <Hashtable>]
   [-File <String>]
   [-Files <String[]>]
   [-JobName <String>]
   [-Profile <AzureSMProfile>]
   [-Query <String>]
   [-RunAsFileJob]
   [-StatusFolder <String>]
   [<CommonParameters>]

Description

This version of Azure PowerShell HDInsight is deprecated. These cmdlets will be removed by January 1, 2017. Please use the newer version of Azure PowerShell HDInsight.

For information about how to use the new HDInsight to create a cluster, see Create Linux-based clusters in HDInsight using Azure PowerShell (https://azure.microsoft.com/en-us/documentation/articles/hdinsight-hadoop-create-linux-clusters-azure-powershell/). For information about how to submit jobs by using Azure PowerShell and other approaches, see Submit Hadoop jobs in HDInsight (https://azure.microsoft.com/en-us/documentation/articles/hdinsight-submit-hadoop-jobs-programmatically/). For reference information about Azure PowerShell HDInsight, see Azure HDInsight Cmdlets (https://msdn.microsoft.com/en-us/library/mt438705.aspx).

The New-AzureHDInsightHiveJobDefinition cmdlet defines a Hive job for an Azure HDInsight service.

Examples

Example 1: Create a Hive job definition

PS C:\>$HiveJobDefinition = New-AzureHDInsightHiveJobDefinition -Query $QueryString

This command creates a Hive job definition that uses a pre-defined query string, and then stores it in the $HiveJobDefinition variable.

Optional Parameters

-Arguments

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

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Defines

Specifies Hadoop configuration values to set for when a job runs.

Type:Hashtable
Aliases:Params
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-File

Specifies the path to a file that contains a query to run. You can use this parameter instead of the Query parameter.

Type:String
Aliases:QueryFile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Files

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

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobName

Specifies the name of the Hive job to define. If you do not specify this parameter, the default name is used: "Hive: <first 100 characters of query>".

Type:String
Aliases:Name
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Query

Specifies a Hive query.

Type:String
Aliases:QueryText
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunAsFileJob

Indicates that this cmdlet creates a file in the default Azure storage account in which to store a query. This cmdlet submits the job that references this file as a script to run.You can use this functionality to handle special characters such as percent sign (%) that would fail on a job submission through Templeton, because Templeton interprets a query with a percent sign as a URL parameter.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StatusFolder

Specifies the location of the folder that contains standard outputs and error outputs for a job, including its exit code and task logs.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False