Power Shell script to load data in to Data Lake Store

In an earlier post, we talked about self-service process to hydrate the Data Lake Store. We also mentioned the need to use Power Shell to load data files larger than 2Gb.

Here is the Power Shell script:

Provide your credentials to login to Azure:

$MyAzureName = “<YourAzureUsername>“;
$MyAzurePassword = ConvertTo-SecureString ‘<YourAzurePassword>’ -AsPlainText -Force;
$AzureRMCredential = New-Object System.Management.Automation.PSCredential($MyAzureName, $MyAzurePassword)
Login-AzureRmAccount -Credential $AzureRMCredential

Connect to your subscription to copy the file:
Get-AzureRmSubscription
Select-AzureRmSubscription -SubscriptionName “<SubscriptionName>
Import-AzureRmDataLakeStoreItem -AccountName “<DataLakeStoreName>” -Path <SourceFilePath> -Destination <DestinationFilePath>

Following link walks through the process to Install Power Shell:

https://msdn.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell

 

Leave a comment