Azure / azure-cli

Azure Command-Line Interface
MIT License
3.95k stars 2.93k forks source link

Cannot create a linked-service of type AzureDatabricksDeltaLake #17498

Open jonathancisneros opened 3 years ago

jonathancisneros commented 3 years ago

Describe the bug Getting "Bad Request" error when using az datafactory linked-service create command to create a linked service of type AzureDatabricksDeltaLake, any other type is working fine.

To Reproduce Run the following command in a PowerShell console in a Windows machine: az datafactory linked-service create --factory-name "myadf" --resource-group "myrg" --linked-service-name "test" --properties "C:\adf\linkedService\test-properties.json"

The content in the properties file is as follows:

{
    "description": "Test linked service",
    "type": "AzureDatabricksDeltaLake",
    "typeProperties": {
        "domain": "https://adb-123456789.0.azuredatabricks.net",
        "clusterId": "1212-232323-abcdef111",
        "accessToken": {
            "type": "AzureKeyVaultSecret",
            "store": {
                "referenceName": "irmkeyvault",
                "type": "LinkedServiceReference"
            },
            "secretName": "cluster-token"
        }
    }
}

The result of running above command is: Operation returned an invalid status 'Bad Request'

Expected behavior Linked service successfully created in the Factory and command printing the resulting linked service JSON object.

Environment summary

yungezz commented 3 years ago

add @qwordy to have a look

kenchon commented 2 years ago

Though I guess this is a problem of Azure DataFactory platform rather than azure-cli, I report it here.

I had same issue at az datafactory pipeline-run show command (docs here).

Following is how I reproduced it:

# Create run and get runId

runId=$(
    az datafactory pipeline create-run \
        --factory-name $myAdfName \
        --name $myPipelineName \
        --resource-group $myAdfRg \
        --output tsv \
        --query "runId" \
)

Command group 'datafactory pipeline' is experimental and not covered by customer support. Please use with discretion.

# Show run status

az datafactory pipeline-run show \
    --factory-name $myAdfName \
    --resource-group $myAdfRg \
    --run-id $runId

Command group 'datafactory pipeline-run' is experimental and not covered by customer support. Please use with discret
ion.
BadRequestError: Operation returned an invalid status 'Bad Request'

here's az-cli version details:

az -v
azure-cli                         2.14.2 *

core                              2.14.2 *
telemetry                          1.0.6

Extensions:
azure-devops                      0.20.0
databricks                         0.7.3
datafactory                        0.2.1
logicapp                           0.1.1
ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @shawnxzq, @lmy269, @Jingshu923.

Issue Details
**Describe the bug** Getting "Bad Request" error when using **az datafactory linked-service create** command to create a linked service of type **AzureDatabricksDeltaLake**, any other type is working fine. **To Reproduce** Run the following command in a PowerShell console in a Windows machine: `az datafactory linked-service create --factory-name "myadf" --resource-group "myrg" --linked-service-name "test" --properties "C:\adf\linkedService\test-properties.json"` The content in the properties file is as follows: ``` { "description": "Test linked service", "type": "AzureDatabricksDeltaLake", "typeProperties": { "domain": "https://adb-123456789.0.azuredatabricks.net", "clusterId": "1212-232323-abcdef111", "accessToken": { "type": "AzureKeyVaultSecret", "store": { "referenceName": "irmkeyvault", "type": "LinkedServiceReference" }, "secretName": "cluster-token" } } } ``` The result of running above command is: `Operation returned an invalid status 'Bad Request'` **Expected behavior** Linked service successfully created in the Factory and command printing the resulting linked service JSON object. **Environment summary** - azure-cli: 2.21.0 - datafactory extension: 0.2.0
Author: jonathancisneros
Assignees: evelyn-ys
Labels: `Service Attention`, `question`, `Data Factory`
Milestone: Backlog
shawnxzq commented 2 years ago

@jonathancisneros could you please share the log with the debug option enabled? Thanks!

shawnxzq commented 2 years ago

@jonathancisneros Is there any chance to try it with debug option and share the log with us? It will very helpful for us the understand the real issue, thanks!