編輯

共用方式為


New-AzHDInsightSqoopJobDefinition

Creates a Sqoop job object.

Syntax

New-AzHDInsightSqoopJobDefinition
   [-Files <String[]>]
   [-StatusFolder <String>]
   [-File <String>]
   [-Command <String>]
   [-LibDir <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

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

Examples

Example 1: Create a Sqoop job definition

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

New-AzHDInsightSqoopJobDefinition -StatusFolder $statusFolder `
            -Command $sqoopCommand `
        | Start-AzHDInsightJob -ClusterName $clusterName `
            -ClusterCredential $clusterCreds

This command creates a Sqoop job definition.

Parameters

-Command

Specifies the Sqoop command.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-File

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
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LibDir

Specifies the library directory for the Sqoop job.

Type:String
Position:Named
Default value:None
Required:False
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.

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

Inputs

None

Outputs

AzureHDInsightSqoopJobDefinition