1. Open azure power shell , please type the following command
Get-AzurePublishSettingsFile
It will open Azure login page, enter the credentials
Once after successful login, the Public settings file will be downloaded automatically.
2. After use the below Import command to import the settings file
Import-AzurePublishSettingsFile <path to file>
3.please use the below script to connect to hive and run hive.
$subscriptionName = "Azure in Open"
PS C:\> $clusterName = "IngramCluster"
PS C:\> Select-AzureSubscription $subscriptionName
PS C:\> Select-AzureSubscription -SubscriptionName
$subscriptionName
PS C:\> Use-AzureHDInsightCluster $clusterName
Successfully connected to cluster IngramCluster
PS C:\> Invoke-Hive -Query "select * from
hivesampletable limit 5;"
Submitting Hive query..
Started Hive query with jobDetails Id :
job_1421995004773_0004
Hive query completed Successfully
8
18:54:20 en-US Android
Samsung SCH-i500
California United States 13.9204007
0
0
23
19:19:44 en-US Android HTC
Incredible Pennsylvania United
States NULL 0
0
23
19:19:46 en-US Android
HTC Incredible
Pennsylvania United States 1.4757422
0
1
23
19:19:47 en-US Android
HTC Incredible Pennsylvania
United States 0.245968 0
2
28
01:37:50 en-US Android
Motorola Droid X
Colorado United States
20.3095339 1