New-AzHDInsightHiveJobDefinition
Creates a Hive job object.
Syntax
New-AzHDInsightHiveJobDefinition
[-Arguments <String[]>]
[-Files <String[]>]
[-StatusFolder <String>]
[-Defines <Hashtable>]
[-File <String>]
[-JobName <String>]
[-Query <String>]
[-RunAsFileJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzHDInsightHiveJobDefinition cmdlet defines a Hive job object for use with an Azure HDInsight cluster.
Examples
Example 1: Create a Hive job definition
PS C:\># Cluster info
PS C:\>$clusterName = "your-hadoop-001"
PS C:\>$clusterCreds = Get-Credential
# Hive job details
PS C:\>$statusFolder = "<status folder>"
PS C:\>$query = "SHOW TABLES"
PS C:\>New-AzHDInsightHiveJobDefinition -StatusFolder $statusFolder `
-Query $query `
| Start-AzHDInsightJob `
-ClusterName $clusterName `
-ClusterCredential $clusterCreds
This command creates a Hive job definition.
Parameters
Specifies an array of arguments for the 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 |
The credentials, account, tenant, and subscription used for communication with azure
Type: | Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies Hadoop configuration values to set for when the job runs.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 |
Specifies the name of the job.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the Hive query.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 |
Specifies the location of the folder that contains standard outputs and error outputs for a job.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
AzureHDInsightHiveJobDefinition