1
votes

I am working on reading Azure SQL data from a U-SQL script into Data Lake. I am working on creating an external data source in U-SQL. A part of this effort involves the creation of a “credential” using PowerShell. I am following this guidance:

https://docs.microsoft.com/en-us/powershell/module/azurerm.datalakeanalytics/new-azurermdatalakeanalyticscatalogcredential

But, am stuck on an error, shown below. This part of it has me especially stumped: "The resource '' does not exist.". Due to this part of the command : "-Credential (Get-Credential)", I get prompted for login name and password. After that, I get presented with the error.

Please help me decipher this situation. Thank you! Eric

C:\WINDOWS\system32> New-AzureRmDataLakeAnalyticsCatalogCredential -AccountName "" `

              -DatabaseName "<MYDBNAME>" `
              -CredentialName "<MYCREDENTIALNAME>" `
              -Credential (Get-Credential) `
              -Uri "http://<MYSERVERNAME>.database.windows.net:1433"

cmdlet Get-Credential at command pipeline position 1 Supply values for the following parameters: Credential WARNING: The output type defined for this cmdlet is incorrect and will be updated to reflect what is actually returned (and defined in the help) in a future release. New-AzureRmDataLakeAnalyticsCatalogCredential : The resource '' does not exist. Trace: c3e04b2a-2690-4c5e-b61c-58a5ded93c6b Time: 2017-05-10T09:09:07.8971058-07:00 At line:1 char:1 + New-AzureRmDataLakeAnalyticsCatalogCredential -AccountName "bladlalog ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [New-AzureRmData...talogCredential], CloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.DataLakeAnalytics.NewAzureDataLakeAnalyticsCatalogCredential

1
Just tried using Azure Command Line Interface (CLI) and got a similar failed result. CLI COMMAND: az dla catalog credential create --account "<MYACCOUNTNAME>" --database-name "<MYDBNAME>" --credential-name "<MYCREDENTIALNAME>" --user-name "<MYUSERNAME>" --uri "http://<MYSERVERNAME>.database.windows.net:1433" --password "<MYPASSWORD>" RESULT: The resource '' does not exist. Trace: fb013545-5172-40ff-b3b0-d27950f96353 Time: 2017-05-11T09:54:56.6739899-07:00 REFERENCE: docs.microsoft.com/en-us/cli/azure/dla/catalog/… - EricCodebot
If you try Test-AdlAnalyticsAccount -Name "<MYACCOUNTNAME>" and Test-AdlCatalogItem -Account "<MYACCOUNTNAME>" -ItemType Database -Path "<MYDBNAME>", what output do you see? These should both return true, indicating that both the Data Lake Analytics account and the U-SQL database exist. If one of those return false, then you'll need to first create the missing thing before creating the credential. I hope this helps! - Matt H
Also, there's a GitHub issue tracking the problem of bad error messages: github.com/Azure/azure-powershell/issues/3649 (Azure PowerShell cmdlets currently don't return the useful, specific info that the service outputs.) - Matt H
Thank you for the replies, Matt H! The Test-AdlAnalyticsAccount PS command returned "True". And Test-AdlCatalogItem also returned True. BUT.. I made a change. For the database name, I used a new ADL database that I created, and not the source Azure SQL database. And I got the "az dla catalog credential create" to run cleanly. .... The online documentation I initially found was not clear to me for indicating the database expected name was an ADL database, and not the source Azure SQL database. I will see in a moment if I can get my external U-SQL datasource created... Thanks, again! - EricCodebot

1 Answers

1
votes

Solved by using a new ADL database name, that I created, and not the source Azure SQL database. I got the "az dla catalog credential create" to run cleanly. .... The online documentation I initially found was not clear for indicating the expected database name was an ADL database, and not the source Azure SQL database.