Reputation: 113
I have implemented a swagger api definition for custom connector to trigger databricks jobs from Power apps. https://docs.databricks.com/api/azure/workspace/jobs/runnow
/run-now:
post:
responses:
default:
description: default
schema: {}
summary: run-now
description: Run a databricks job
operationId: run_now
parameters:
- name: body
in: body
required: true
schema:
type: object
properties:
job_id:
type: string
description: job_id
job_parameters:
type: object
additionalProperties: true
description: job_parameters
For job_parameters, I defined additionalProperties: true so that it can accept any datatype.
Later I tried to integrate my custom connector in my canvas app in Power apps with this function:
'DatabricksJobsAPI2.1'.runnow({job_id: 86726485724569, job_parameters: {document_ids: "41d0dhtf7-4995-4a00-a972-71598765d9b67"}})
DatabricksJobsAPI2.1 is my custom connector name.
Error: job_parameters expects "UntypedObject" but provided "Record" type.
It should work according to swagger definition but it is not accepting any data type.
But when I test my custom connector in "test" tab it worked well. But in canvas app with functions it is not working. I do not want to use Power automate- for this process. I should only use functions. Is there any other method I should update my swagger definition?.
I wanted to implement this swagger to be not specific job related. It should trigger for any databricks job by assigning manually necessary job_parameters within function but not in Swagger.
Upvotes: 0
Views: 99