Paradime Help Docs
Ask or search…
K

Bolt schedules and metadata API

Paradime provides an handy API to be able to include Bolt runs within your existing data pipeline, by providing two endpoints - one to trigger a schedule run and one to check the status of a run within Paradime.

Requirements

To trigger runs and check the status of a running schedules using the Bolt API you will need:
  • API Key
  • API Secret
  • API Endpoint

API endpoints

Trigger bolt run

This graphQL endpoint will enable you to trigger a run by passing a schedule name set in your paradime_schedules.yml.
mutation trigger($scheduleName: String!) {
triggerBoltRun(scheduleName: $scheduleName){
runId
}
}

Get run status

This graphQL endpoint will enable you to check the status of a schedule run by passing the runID of a Bolt schedule.
query Status($runId: Int!) {
boltRunStatus(runId: $runId) {
state
}
}

Cancel run

This graphQL endpoint will enable you to cancel a schedule run by passing the runID of a Bolt schedule.
mutation cancelBoltRun($runId: Int!) {
cancelBoltRun(scheduleRunId: $runId) {
ok
}
}

Get Bolt Command Details

This graphQL endpoint will enable you extract for a given command all the related details including raw error logs by passing a commandId. This is normally used in conjunction with the Paradime Webhooks.
query BoltCommand($commandId: Int!) {
boltCommand(commandId: 193440) {
command
startDttm
endDttm
stdout
stderr
returnCode
scheduleRunId
resources {
id
path
}
}
}

Get Command resource URL

This graphQL endpoint will enable you extract for a given command the related resource generated by the execution of the command, for example the run_results.json or the manifest.json by passing a resourceId. This is normally used in conjunction with the Paradime Webhooks.
query BoltResourceUrl($resourceId: Int!) {
boltResourceUrl(resourceId: $resourceId) {
ok
url
}
}

Trigger Bolt Schedule with a modified command for a run

This graphQL endpoint will enable you to trigger a Bolt run with a custom command and overwrite the actual commands defined in the schedule for that particular run. This only modifies the command for the triggered Bolt run and not the commands defined in the schedule.
mutation TriggerBoltRun {
triggerBoltRun(scheduleName: "baz", commands: ["dbt run --select max"]) {
ok
runId
}
}