none
Error Submitting Data Lake Analytics Job in PowerShell

    Question

  • I'm getting the following error when trying to submit a Data Lake Analytics job using PowerShell. I am using Windows 7 64-bit and PowerShell v3:

    Submit-AzureRmDataLakeAnalyticsJob : Object reference not set to an instance of an object.

    At line:1 char:1

    + Submit-AzureRmDataLakeAnalyticsJob -Account "cellusanalyticstest2" -Name "test"  ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : CloseError: (:) [Submit-AzureRmDataLakeAnalyticsJob], NullReferenceException

        + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeAnalytics.SubmitAzureDataLakeAnalyticsJob  

     

    This error has occurred using two different Azure accounts on two different computers with the same specs.

    Friday, July 22, 2016 4:04 PM

All replies

  • The following works for me:

    $dataLakeAnalyticsName = "accountaname"
    $usqlScript = "c:\folder\script.usql"

    $job = Submit-AzureRmDataLakeAnalyticsJob -Name "Jobname" -AccountName $dataLakeAnalyticsName –ScriptPath $usqlScript -DegreeOfParallelism 5

    While (($t = Get-AzureRmDataLakeAnalyticsJob -AccountName $dataLakeAnalyticsName -JobId $job.JobId).State -ne "Ended"){
        Write-Host "Job status: "$t.State"..."
        Start-Sleep -seconds 60
    }

    Get-AzureRmDataLakeAnalyticsJob -AccountName $dataLakeAnalyticsName -JobId $job.JobId

    Thursday, August 18, 2016 5:02 PM