Azure Data Lake Command-line Quickstart using Azure Cloud Shell


  • Have you been using Azure Data Lake Analytics mainly from the Azure Portal or Visual Studio interfaces?
  • Do you want to use Data Lake Analytics programmatically without installing anything?
  • Do you want to get started with Azure PowerShell, but you’re on a Mac or Linux machine?

Here’s how to get started with Azure PowerShell or Azure CLI 2.0 today using Cloud Shell!

Start your session

It’s easy to start a Cloud Shell session:

  1. Head over to the Azure Portal.
     
  2. At the top of the page, click the Cloud Shell button:

     
  3. The Cloud Shell UI opens at the bottom of the browser window.
    • PowerShell is chosen by default.
    • To use CLI 2.0, select Bash from the dropdown:

       
  4. After you session loads you’ll be able to get started with Azure PowerShell or Azure CLI 2.0 right away!
    • PowerShell: Try running this: Get-AdlJob -Account ACCOUNTNAME
    • CLI 2.0: Try running this:  az dla job list -n ACCOUNTNAME

     

  5. To see your job list at the same time, open your Data Lake Analytics account, then click View all jobs:

     

Sample commands

Here are some commands you can use right away. Replace the bolded parts with your own values.
 

Get details about your account:

Azure PowerShell
Get-AdlAnalyticsAccount -Account ACCOUNTNAME
Azure CLI 2.0
az dla account show -n ACCOUNTNAME

 

List your jobs:

Azure PowerShell
Get-AdlJob -Account ACCOUNTNAME -Submitter YOURUSERNAME@CONTOSO.COM
Azure CLI 2.0
az dla job list -n ACCOUNTNAME --submitter YOURUSERNAME@CONTOSO.COM

 

Get job details… and resubmit the job with default priority and AUs:

Azure PowerShell
$job = Get-AdlJob -Account ACCOUNTNAME -JobId JOB-ID

Submit-AdlJob -Account ACCOUNTNAME -Name $job.Name -Script $job.Properties.Script
Azure CLI 2.0
az dla job show -n ACCOUNTNAME --job-identity JOB-ID

az dla job show -n ACCOUNTNAME --job-identity JOB-ID --query "{Script:properties.script}" --out table | tail -n+3 > script.usql

az dla job submit -n ACCOUNTNAME -name "Resubmitted job" -Script @{script.usql}

 
You should now see the new job in the job list above in your browser!
 

Learn more

For more information, or once you’re ready to install Azure PowerShell or Azure CLI 2.0 locally, see one of our Getting Started guides:

Try this feature today!

Give this feature a try and let us know your feedback in the comments.

Interested in any other samples, features, or improvements? Let us know and vote for them on our UserVoice page!

 

Comments (0)

Skip to main content