Power Shell script to load data in to Data Lake Store

No comments

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s