ADF + A Batch pool + run a python script - Is the script able to use linked service

HERVOUET Christophe (External) 126 Reputation points
2022-09-02T07:14:43.52+00:00

Hi

Currently I am using python scripts on ADF via Azure Batch pool

For CICD & variabilization, I pass to python all the elements for its connections to data sources via variables (sources URL + credentials + secrets etc..)

On the pipeline, before running the python task, I use multiple tasks to search for values of credential & secrets on my Azure key vault

These values are placed in the famous variables
And it works very well

However I had a big question
I saw that we could on ADF , make linked services using managed identity (Exp: My synapse pool trusts my ADF resource) - super cool feature

Is python able to exploit these linked services directly , on the code ? Would be nice to gain passages of variables ? no ?

Or python is completely impervious to ADF?

Merci beaucoup ;>)

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2022-09-05T08:38:16.337+00:00

    Hi @HERVOUET Christophe (External) ,

    Thanks for posting query in Microsoft Q&A Platform. Please check response inline.

    Is python able to exploit these linked services directly, on the code?
    No, your Python code on Batch pool cannot make sure of linked service in Azure Data factory. ADF linked services are internal to it.

    Python code should authenticate with external resources by its own, it cannot use ADF linked service. But yes, from ADF you can pass parameters as you are doing currently.

    Hope this helps. Please let me know if any further queries.

    -------------

    Please consider hitting Accept Answer button. Accepted answers help community as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.