Hello All,
Thank you for all your suggestions on this thread.
We have raised the issue as a product bug to Microsoft. They did not update us as to why parameters do not work with http request. However they did demo to us that parameters work with python script.
This resolved our problem and I have tested by passing multiple parameters through databricks to ADF and it was taking the parameters correctly.
The document doesn't mention how to write the parameters; you have to write it inside the response. Eg:
##code******************
from azure.identity import DefaultAzureCredential
from azure.mgmt.datafactory import DataFactoryManagementClient
print("Running ADF Pipeline....")
tenant_id = ***
client_id = ***
client_secret = ***
parameters = {
'curr_working_user': f'{current_user}',
'ServerName': f'{servername}',
'SharedFolder': f'{shared_folder}',
'Folder': f'{folder}'
}
def main():
client = DataFactoryManagementClient(
credential=ClientSecretCredential(tenant_id, client_id, client_secret),
subscription_id = "***",
)
response = client.pipelines.create_run(
resource_group_name = "***",
factory_name = "***",
pipeline_name = "Test Adf from databricks",
parameters = parameters or {}
)
print(response)
if name == "main":
main()