azure-data-factoryazure-synapse-pipeline

How to parametrize the KeyVault secret field in a Linked Service, using functions and LS parameters?


EDIT: Pipeline executes fine and the behavior is observed only when testing connection...

I am trying to parametrize the Secret Name value in a linked service. When using a LS parameter, this works fine: enter image description here

If, I only use the concat function, concatenating two strings this also works fine: enter image description here

But when I try to use a LS parameter in the function, I get an error: enter image description here

Error thrown:

The parameters and expression cannot be resolved for schema operations. Error Message: { "message": "ErrorCode=InvalidTemplate, ErrorMessage=The template function 'linkedService' is not defined or not valid." } Activity ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx

Parameter is a string:

enter image description here

Any ideas what did I do wrong?

I have tried changing the .json directly but outcome is the same.

I have also tried packing the parameter in curly brackets, like so: @{concat(linkedService().ServicePrincipalId,'-password')}


Solution

  • In general, the above occurs when we use a linked service parameter in the dynamic expression without creating.

    In this case, I have reproduced the same scenario, and these are my observations.

    As the pipeline execution is fine, this might be a bug in a parameterized Key vault linked service test connection.

    Using different parameters or string interpolation can act as a temporary workaround for this.