如何使用;定义“;Microsoft.Hadoop.WebHCat.Protocol.WebHCatHttpClient.CreateHiveJob的参数?
我猜如何使用;定义“;Microsoft.Hadoop.WebHCat.Protocol.WebHCatHttpClient.CreateHiveJob的参数?,hive,azure-hdinsight,hcatalog,Hive,Azure Hdinsight,Hcatalog,我猜defines允许向配置单元查询传递参数,但我还没有找到任何文档或使用示例。如何在查询中使用这些参数?我正在使用powershell中的defines参数,但希望它能帮助您 首先,在PowerShell脚本中,我编写了如下内容: [HashTable] $defines $defines = @{} $defines.Add("someContainerUrl",${someContainerUrl}) ADD FILES ${hiveconf:someContainerUrl}/
defines
允许向配置单元查询传递参数,但我还没有找到任何文档或使用示例。如何在查询中使用这些参数?我正在使用powershell中的defines参数,但希望它能帮助您
首先,在PowerShell脚本中,我编写了如下内容:
[HashTable] $defines
$defines = @{}
$defines.Add("someContainerUrl",${someContainerUrl})
ADD FILES
${hiveconf:someContainerUrl}/SomeFile.exe;
然后,在调用HDInsight时,我使用了这个新的defines变量:
$jobDef = New-AzureHDInsightHiveJobDefinition -Query $hiveQuery -JobName $jobName -Defines $defines -StatusFolder "/JobStatus/Hive"
$hiveJob = Start-AzureHDInsightJob –Cluster $clusterName –JobDefinition $jobDef
然后在我的配置单元代码中,我可以使用此定义变量,例如:
[HashTable] $defines
$defines = @{}
$defines.Add("someContainerUrl",${someContainerUrl})
ADD FILES
${hiveconf:someContainerUrl}/SomeFile.exe;
我认为这篇文章也可能对您有所帮助: