Airflow (GraphQL)

Related queries and mutations in Integrations and connections. Each has its own section.

Queries

getJobDependencies (query)

getJobDependencies is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Deprecated: Use getJobDependenciesV2 instead.

DEPRECATED. Return the job- and external-asset-level dependency graph for the given job. Result contains job nodes (jobs this one triggers or that trigger it) and external asset nodes (e.g. Airflow Datasets this job reads or writes).

Arguments

ArgumentTypeDescription
jobMconString!MCON of the job whose dependency graph should be returned.
directionLineageGraphTraversalDirection!Direction to traverse from the job: 'upstream' (jobs/external assets that lead into this job) or 'downstream' (jobs this job triggers and external assets this job produces).

Returns

JobLineageGraph

Example

query GetJobDependencies($jobMcon: String!, $direction: LineageGraphTraversalDirection!) {
  getJobDependencies(jobMcon: $jobMcon, direction: $direction) {
    nodes {
      mcon
      objectType
      jobId
      taskId
      uri
      displayName
      latestRunStatus
    }
  }
}

Related types

JobLineageGraph, LineageGraphTraversalDirection

getTaskGraph (query)

getTaskGraph is a query in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Deprecated: Use getTaskGraphV2 instead.

DEPRECATED. Return the intra-job task graph for the given job: task nodes connected by IS_DOWNSTREAM edges. Edges that leave the job (to tables, other jobs, or external assets) are filtered out.

Arguments

ArgumentTypeDescription
jobMconString!MCON of the job whose intra-job task graph should be returned.

Returns

JobLineageGraph

Example

query GetTaskGraph($jobMcon: String!) {
  getTaskGraph(jobMcon: $jobMcon) {
    nodes {
      mcon
      objectType
      jobId
      taskId
      uri
      displayName
      latestRunStatus
    }
  }
}

Related types

JobLineageGraph

Mutations

uploadAirflowDagResult (mutation)

uploadAirflowDagResult is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Upload Airflow DAG run result

Arguments

ArgumentTypeDescription
dagIdString!DAG identifier
endDateDateTime!'end_date' as returned by Airflow
envAirflowEnvInput!Airflow environment information
executionDateDateTime!'execution_date' as returned by Airflow
payloadGenericScalar!Payload for the result, a JSON object containing all data gathered form Airflow on the callbacks.
reasonString'reason' field from Airflow Run
resourceNameStringETL container name used to disambiguate if there are multiple Airflow connections in the account. If there's not a single active Airflow connection in the given ETL container an error will be thrown. If no resource_name is specified then it's expected to be a single active Airflow connection on the account.
runIdString!DAG Run Identifier
startDateDateTime!'start_date' as returned by Airflow
stateString!Airflow state, for example success, failed, up_for_retry, etc.
successBoolean!Flag indicating if the result was successful or not
tags[String]List of tags associated with the DAG run

Returns

UploadAirflowDagResult

Example

mutation UploadAirflowDagResult($dagId: String!, $endDate: DateTime!, $env: AirflowEnvInput!, $executionDate: DateTime!, $payload: GenericScalar!, $runId: String!, $startDate: DateTime!, $state: String!, $success: Boolean!) {
  uploadAirflowDagResult(dagId: $dagId, endDate: $endDate, env: $env, executionDate: $executionDate, payload: $payload, runId: $runId, startDate: $startDate, state: $state, success: $success) {
    ok
  }
}

Types used only by uploadAirflowDagResult

UploadAirflowDagResult

Object type. Uploads the result for a DAG run.

FieldTypeDescription
okBooleanResult

Related types

AirflowEnvInput, DateTime, GenericScalar

uploadAirflowSlaMisses (mutation)

uploadAirflowSlaMisses is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Upload Airflow SLA misses

Arguments

ArgumentTypeDescription
dagIdString!DAG identifier
envAirflowEnvInput!Airflow environment information
payloadGenericScalar!Payload for the result, a JSON object containing all data gathered form Airflow on the callbacks.
resourceNameStringETL container name used to disambiguate if there are multiple Airflow connections in the account. If there's not a single active Airflow connection in the given ETL container an error will be thrown. If no resource_name is specified then it's expected to be a single active Airflow connection on the account.

Returns

UploadAirflowSlaMisses

Example

mutation UploadAirflowSlaMisses($dagId: String!, $env: AirflowEnvInput!, $payload: GenericScalar!) {
  uploadAirflowSlaMisses(dagId: $dagId, env: $env, payload: $payload) {
    ok
  }
}

Types used only by uploadAirflowSlaMisses

UploadAirflowSlaMisses

Object type. Uploads a list of SLAs missed for a DAG.

FieldTypeDescription
okBooleanResult

Related types

AirflowEnvInput, GenericScalar

uploadAirflowTaskResult (mutation)

uploadAirflowTaskResult is a mutation in the Monte Carlo GraphQL API, in Integrations and connections. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Upload Airflow Task run result

Arguments

ArgumentTypeDescription
attemptNumberInt!Attempt number for this Task Run, 1 for the first attempt.
dagIdString!DAG identifier
durationFloatTask Run duration in seconds
endDateDateTime!'end_date' as returned by Airflow
envAirflowEnvInput!Airflow environment information
exceptionMessageStringException message obtained from Airflow 'exception' attribute
executionDateDateTime!'execution_date' as returned by Airflow
logUrlStringURL to access the log for this Task Run
nextRetryDateDateTimeDatetime for the next retry as returned by Airflow
payloadGenericScalar!Payload for the result, a JSON object containing all data gathered form Airflow on the callbacks.
resourceNameStringETL container name used to disambiguate if there are multiple Airflow connections in the account. If there's not a single active Airflow connection in the given ETL container an error will be thrown. If no resource_name is specified then it's expected to be a single active Airflow connection on the account.
runIdString!DAG Run Identifier
startDateDateTime!'start_date' as returned by Airflow
stateString!Airflow state, for example success, failed, up_for_retry, etc.
successBoolean!Flag indicating if the result was successful or not
tags[String]List of tags associated with the DAG run
taskIdString!Airflow Task ID

Returns

UploadAirflowTaskResult

Example

mutation UploadAirflowTaskResult($attemptNumber: Int!, $dagId: String!, $endDate: DateTime!, $env: AirflowEnvInput!, $executionDate: DateTime!, $payload: GenericScalar!, $runId: String!, $startDate: DateTime!, $state: String!, $success: Boolean!, $taskId: String!) {
  uploadAirflowTaskResult(attemptNumber: $attemptNumber, dagId: $dagId, endDate: $endDate, env: $env, executionDate: $executionDate, payload: $payload, runId: $runId, startDate: $startDate, state: $state, success: $success, taskId: $taskId) {
    ok
  }
}

Types used only by uploadAirflowTaskResult

UploadAirflowTaskResult

Object type. Uploads the result for a DAG run.

FieldTypeDescription
okBooleanResult

Related types

AirflowEnvInput, DateTime, GenericScalar

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.