Database Reference
In-Depth Information
NOTE
Follow the instructions at the following website to get Windows Azure
HDInsight PowerShell installed and configured for your environment:
http://www.windowsazure.com/en-us/manage/services/hdinsight/
install-and-configure-powershell-for-hdinsight/ .
For example, the following script will upload the 1987.csv file from my
local drive to the airlinedata container with a blob name of 1987 . The
first set of parameters provides the details for where to put the data in
Windows Azure, the second set of parameters tells us what data to put
there. We then open up the connection and, using the
Set-AzureStorageBlobContent command, we copy the data to
Windows Azure:
#Configure Azure Blob Storage Parameters
$subscriptionName = "msdn"
$storageAccountName = "sqlpdw"
$containerName = "airlinedata"
$blobName = "1987"
#Configure Local Parameters
$fileName
="C:\Users\brimit\SkyDrive\AirStats\1987.csv.bz2"
# Get the storage account key
Select-AzureSubscription $subscriptionName
$storageaccountkey = get-azurestoragekey
$storageAccountName
| %{$_.Primary}
# Create the storage context object
$destContext = New-AzureStorageContext
-StorageAccountName
$storageAccountName -StorageAccountKey
$storageaccountkey
Search WWH ::




Custom Search