Created
April 6, 2014 18:05
-
-
Save mwinkle/10009528 to your computer and use it in GitHub Desktop.
This gist shows how to pass in arbitrary storage accounts, as well as HCatalog Metadata stores on a per job basis via PowerShell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$subscriptionName = "<subscriptionname>" | |
$clusterName = "<cluster name>" | |
Select-AzureSubscription -SubscriptionName $subscriptionName | |
Use-AzureHDInsightCluster $clusterName | |
$querystring = "show tables; select name, salary from emp;" | |
[HashTable] $defines | |
$defines = @{} | |
$defines.Add("hive.metastore.uris", "") | |
$defines.Add("javax.jdo.option.ConnectionURL", "jdbc:sqlserver://<name>.database.windows.net;database=<dbname>; encrypt=true;trustServerCertificate=true;create=false") | |
$defines.Add("fs.azure.account.key.<name1>.blob.core.windows.net", "<clear text key1>") | |
$defines.Add("fs.azure.account.key.<name2>.blob.core.windows.net", "<clear text key2>") | |
$defines.Add("javax.jdo.option.ConnectionUserName", "<user>@<dbserver>") | |
$defines.Add("javax.jdo.option.ConnectionPassword", "<password>") | |
Invoke-Hive -Defines $defines -Query $queryString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment