Lineage (GraphQL)

Related queries and mutations in Catalog and lineage. Each has its own section.

Queries

getAssetLineage (query)

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

Status: Experimental

Return the typed lineage graph around the given job: the tables it reads and writes and the jobs it triggers or is triggered by, with each edge's relationship type. Task nodes and direct table-to-table edges are not included — job-mediated paths carry those relationships.

Arguments

ArgumentTypeDescription
mconString!MCON of the asset at the root of the graph. V1 accepts job MCONs.
directionLineageGraphTraversalDirectionDirection to traverse from the root asset. Defaults to both directions — the asset's full neighborhood.
hopsIntMaximum traversal depth. Defaults to 30; larger values are capped at 30.
limitIntNode budget for the traversal. Defaults to 10000; larger values are capped at 10000. When the budget is hit, the response is marked truncated rather than silently partial.

Returns

AssetLineageResult!

Example

query GetAssetLineage($mcon: String!) {
  getAssetLineage(mcon: $mcon) {
    hasTaskData
  }
}

Types used only by getAssetLineage

AssetLineageResult

Object type. Response of getAssetLineage — the typed graph around a job, plus
the metadata needed to render it honestly.

FieldTypeDescription
graphJobLineageGraph!The typed node/edge graph around the root job.
truncationAssetLineageTruncation!Clipping information — distinguishes an empty graph from a clipped one.
hasTaskDataBoolean!Whether the job has tasks recorded. Distinguishes 'job has no tasks' from 'job has tasks but no lineage edges arrived' — the latter is a job whose tasks are recorded but that produced no lineage, e.g. an Airflow DAG that never sent a result callback.
AssetLineageTruncation

Object type. Whether the lineage traversal was clipped by its node limit.

FieldTypeDescription
truncatedBoolean!True when the traversal hit the node limit — the graph is clipped, not complete.
limitInt!The node limit the traversal ran with.

Related types

JobLineageGraph, LineageGraphTraversalDirection

getDerivedTablesPartialLineage (query)

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

Tables and its columns that are influenced by the source table and column. Note we only return columns that are influenced by the source column in the response.

Arguments

ArgumentTypeDescription
mconStringsource table mcon
columnStringsource column
cursorStringcursor for getting the next page
pageSizeIntnumber of derived tables to return in a call Default: 20.

Returns

DerivedTablesLineageResult

Example

query GetDerivedTablesPartialLineage {
  getDerivedTablesPartialLineage {
    mcon
    sourceColumn
    isLastPage
    cursor
  }
}

Types used only by getDerivedTablesPartialLineage

DerivedTablePartialLineage

Object type.

FieldTypeDescription
mconStringDerived destination table's mcon
columns[SourceColumn]A list of columns in the derived table, that are derived from some source
sourceColumnUsedAsNonSelectedBooleanIndicates whether the input source column is used as a non selected column in the query that derives the current table
displayNameStringDisplay name for BI tables
DerivedTablesLineageResult

Object type.

FieldTypeDescription
mconStringSource table mcon
sourceColumnStringSource column
destinations[DerivedTablePartialLineage]Derived tables and their columns that are influenced by the source col
isLastPageBooleanIndicates whether this response the the last page of response
cursorStringCursor for getting the next page of results

Related types

SourceColumn

getJobDependenciesV2 (query)

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

Status: Experimental

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 GetJobDependenciesV2($jobMcon: String!, $direction: LineageGraphTraversalDirection!) {
  getJobDependenciesV2(jobMcon: $jobMcon, direction: $direction) {
    nodes {
      mcon
      objectType
      jobId
      taskId
      uri
      displayName
      latestRunStatus
    }
  }
}

Related types

JobLineageGraph, LineageGraphTraversalDirection

getLineageNodeBlockPattern (query)

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

Retrieve a node block pattern

Arguments

ArgumentTypeDescription
uuidString!Node block pattern id

Returns

LineageNodeBlockPattern

Example

query GetLineageNodeBlockPattern($uuid: String!) {
  getLineageNodeBlockPattern(uuid: $uuid) {
    id
    uuid
    accountId
    resourceId
    datasetRegexp
    projectRegexp
    tableRegexp
    createdTime
    lastUpdateTime
  }
}

Related types

LineageNodeBlockPattern

getLineageNodeBlockPatterns (query)

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

Retrieve a list of node block patterns

Arguments

ArgumentTypeDescription
resourceIdString!Resource id of the resources

Returns

[LineageNodeBlockPattern]

Example

query GetLineageNodeBlockPatterns($resourceId: String!) {
  getLineageNodeBlockPatterns(resourceId: $resourceId) {
    id
    uuid
    accountId
    resourceId
    datasetRegexp
    projectRegexp
    tableRegexp
    createdTime
    lastUpdateTime
  }
}

Related types

LineageNodeBlockPattern

getLineageNodeCollapsingRule (query)

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

Retrieve a node collapsing rule

Arguments

ArgumentTypeDescription
uuidUUID!Collapsing rule UUID

Returns

LineageNodeCollapsingRule

Example

query GetLineageNodeCollapsingRule($uuid: UUID!) {
  getLineageNodeCollapsingRule(uuid: $uuid) {
    createdTime
    updatedTime
    uuid
    accountId
    pattern
    caseInsensitive
  }
}

Related types

LineageNodeCollapsingRule, UUID

getLineageNodeCollapsingRules (query)

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

Retrieve a list of node collapsing rules

Returns

[LineageNodeCollapsingRule]

Example

query GetLineageNodeCollapsingRules {
  getLineageNodeCollapsingRules {
    createdTime
    updatedTime
    uuid
    accountId
    pattern
    caseInsensitive
  }
}

Related types

LineageNodeCollapsingRule

getLineageNodeReplacementRule (query)

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

Retrieve a node replacement rule

Arguments

ArgumentTypeDescription
uuidUUID!Replacement rule UUID

Returns

LineageNodeReplacementRule

Example

query GetLineageNodeReplacementRule($uuid: UUID!) {
  getLineageNodeReplacementRule(uuid: $uuid) {
    id
    uuid
    accountId
    resourceId
    pattern
    replacement
    caseInsensitive
    lastUpdateTime
  }
}

Related types

LineageNodeReplacementRule, UUID

getLineageNodeReplacementRules (query)

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

Retrieve a list of node replacement rules

Arguments

ArgumentTypeDescription
resourceIdUUID!Resource id of the resources

Returns

[LineageNodeReplacementRule]

Example

query GetLineageNodeReplacementRules($resourceId: UUID!) {
  getLineageNodeReplacementRules(resourceId: $resourceId) {
    id
    uuid
    accountId
    resourceId
    pattern
    replacement
    caseInsensitive
    lastUpdateTime
  }
}

Related types

LineageNodeReplacementRule, UUID

getParsedQuery (query)

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

The query, based on which the table's created

Arguments

ArgumentTypeDescription
mconStringSource table mcon

Returns

ParsedQueryResult

Example

query GetParsedQuery {
  getParsedQuery {
    parsedQuery
  }
}

Types used only by getParsedQuery

ParsedQueryResult

Object type.

FieldTypeDescription
parsedQueryStringQuery, based on which the table's created

getTableColumnsLineage (query)

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

Column level lineage for a destination table

Arguments

ArgumentTypeDescription
mconStringDestination table mcon

Returns

TableColumnsLineageResult

Example

query GetTableColumnsLineage {
  getTableColumnsLineage {
    mcon
    timestamp
    displayName
  }
}

Types used only by getTableColumnsLineage

ColumnLineage

Object type.

FieldTypeDescription
selectedColumnStringThe column on the destination table
lineageSources[LineageSources]Direct source lineage of the selected column
LineageSources

Object type.

FieldTypeDescription
mconStringMcon of the source table
sourceColumns[SourceColumn]Source columns from this source table
TableColumnsLineageResult

Object type.

FieldTypeDescription
mconStringDestination(current) table mcon
columnsLineage[ColumnLineage]Lineage of the columns in the table
nonSelectedSourceColumns[LineageSources]Other columns used in conditions for the current table
timestampDateTimeTimestamp when the query that generated the lineage happened
displayNameStringDisplay name for BI tables

Related types

DateTime, SourceColumn

getTaskGraphV2 (query)

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

Status: Experimental

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 GetTaskGraphV2($jobMcon: String!) {
  getTaskGraphV2(jobMcon: $jobMcon) {
    nodes {
      mcon
      objectType
      jobId
      taskId
      uri
      displayName
      latestRunStatus
    }
  }
}

Related types

JobLineageGraph

simulateLineageNodeReplacementRule (query)

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

Simulate a replacement pattern

Arguments

ArgumentTypeDescription
patternString!Input regex pattern
replacementString!Replacement pattern
testInputStrings[String]!Input to test
caseInsensitiveBooleanCase sensitivity of the pattern matching

Returns

[LineageNodeReplacementRuleResult]

Example

query SimulateLineageNodeReplacementRule($pattern: String!, $replacement: String!, $testInputStrings: [String]!) {
  simulateLineageNodeReplacementRule(pattern: $pattern, replacement: $replacement, testInputStrings: $testInputStrings) {
    testInputString
    replacedString
  }
}

Types used only by simulateLineageNodeReplacementRule

LineageNodeReplacementRuleResult

Object type.

FieldTypeDescription
testInputStringStringThe provided test input string
replacedStringStringThe replaced string, using provided pattern/replacement

Mutations

createOrUpdateLineageEdge (mutation)

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

Create or update a lineage edge

Arguments

ArgumentTypeDescription
destinationNodeInput!The destination node
edgeTypeEdgeTypeThe type of edge to create or update. Must be one of IS_DOWNSTREAM, MODIFIES, IS_READ_BY Default: "IS_DOWNSTREAM".
expireAtDateTimeWhen the edge will expire. If not provided, the node will expire 7 days from creation.
sourceNodeInput!The source node

Returns

CreateOrUpdateLineageEdge

Example

mutation CreateOrUpdateLineageEdge($destination: NodeInput!, $source: NodeInput!) {
  createOrUpdateLineageEdge(destination: $destination, source: $source) {
    edge {
      jobTs
      expireAt
      isCustom
    }
  }
}

Types used only by createOrUpdateLineageEdge

CreateOrUpdateLineageEdge

Object type. Create or update a lineage edge

FieldTypeDescription
edgeLineageGraphEdge
LineageGraphEdge

Object type. A lineage graph edge

FieldTypeDescription
sourceLineageGraphNodeThe source node
destinationLineageGraphNodeThe destination node
jobTsDateTimeThe timestamp of the job run or API call that created this edge
expireAtDateTimeThe timestamp when this edge will expire
isCustomBooleanIndicates whether this is a custom lineage edge (created by a user)
NodeInput

Input object type. Minimal information to identify a node

FieldTypeDescription
objectTypeString!Object type
objectIdString!Object identifier
resourceIdUUIDThe id of the resource containing the node
resourceNameStringThe name of the resource containing the node

Related types

DateTime, EdgeType, LineageGraphNode, UUID

createOrUpdateLineageNode (mutation)

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

Create or update a lineage node

Arguments

ArgumentTypeDescription
expireAtDateTimeWhen the node will expire. If not provided, the node will expire 7 days from creation.
nameStringObject name (table name, report name, etc)
objectIdString!Object identifier
objectTypeString!Object type
properties[ObjectPropertyInput]A list of object properties to be indexed by the search service
resourceIdUUIDThe id of the resource containing the node
resourceNameStringThe name of the resource containing the node

Returns

CreateOrUpdateLineageNode

Example

mutation CreateOrUpdateLineageNode($objectId: String!, $objectType: String!) {
  createOrUpdateLineageNode(objectId: $objectId, objectType: $objectType) {
    node {
      mcon
      displayName
      hasDownstreamNodes
      hasUpstreamNodes
      objectType
      isCustom
      jobTs
      expireAt
      isMonitored
      isExcluded
      lastActivity
      elementId
      agentName
      toolCall
      biAssetType
    }
  }
}

Types used only by createOrUpdateLineageNode

CreateOrUpdateLineageNode

Object type. Create or update a lineage node

FieldTypeDescription
nodeLineageGraphNode
ObjectPropertyInput

Input object type. Object properties, indexed by the search service

FieldTypeDescription
propertyNameString!The name (key) of the property
propertyValueString!The value for the property

Related types

DateTime, LineageGraphNode, UUID

createOrUpdateLineageNodeBlockPattern (mutation)

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

Create or update a node block pattern

Arguments

ArgumentTypeDescription
datasetRegexpStringBlock datasets matching the regexp
projectRegexpStringBlock projects matching the regexp
resourceIdUUID!The id of the resource containing the node
tableRegexpStringBlock tables matching the regexp
uuidUUIDThe pattern UUID (updates only)

Returns

CreateOrUpdateLineageNodeBlockPattern

Example

mutation CreateOrUpdateLineageNodeBlockPattern($resourceId: UUID!) {
  createOrUpdateLineageNodeBlockPattern(resourceId: $resourceId) {
    pattern {
      id
      uuid
      accountId
      resourceId
      datasetRegexp
      projectRegexp
      tableRegexp
      createdTime
      lastUpdateTime
    }
  }
}

Types used only by createOrUpdateLineageNodeBlockPattern

CreateOrUpdateLineageNodeBlockPattern

Object type. Create or update a node block pattern

FieldTypeDescription
patternLineageNodeBlockPattern

Related types

LineageNodeBlockPattern, UUID

createOrUpdateLineageNodeCollapsingRule (mutation)

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

Create or update a node collapsing rule

Arguments

ArgumentTypeDescription
caseInsensitiveBooleanCase sensitivity of the pattern matching Default: false.
patternString!Nodes which canonical name matches the pattern will be marked as collapsible
uuidUUIDThe rule UUID (updates only)

Returns

CreateOrUpdateLineageNodeCollapsingRule

Example

mutation CreateOrUpdateLineageNodeCollapsingRule($pattern: String!) {
  createOrUpdateLineageNodeCollapsingRule(pattern: $pattern) {
    rule {
      createdTime
      updatedTime
      uuid
      accountId
      pattern
      caseInsensitive
    }
  }
}

Types used only by createOrUpdateLineageNodeCollapsingRule

CreateOrUpdateLineageNodeCollapsingRule

Object type. Create or update a node collapsing rule

FieldTypeDescription
ruleLineageNodeCollapsingRuleCollapsing rule that was created or updated

Related types

LineageNodeCollapsingRule, UUID

createOrUpdateLineageNodeReplacementRule (mutation)

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

Create or update a node replacement rule

Arguments

ArgumentTypeDescription
caseInsensitiveBooleanCase sensitivity of the pattern matching
patternString!Modify canonical name by replacing the pattern with replacement
replacementString!Modify canonical name by replacing the pattern with replacement
resourceIdUUID!The id of the resource containing the node
uuidUUIDThe rule UUID (updates only)

Returns

CreateOrUpdateLineageNodeReplacementRule

Example

mutation CreateOrUpdateLineageNodeReplacementRule($pattern: String!, $replacement: String!, $resourceId: UUID!) {
  createOrUpdateLineageNodeReplacementRule(pattern: $pattern, replacement: $replacement, resourceId: $resourceId) {
    rule {
      id
      uuid
      accountId
      resourceId
      pattern
      replacement
      caseInsensitive
      lastUpdateTime
    }
  }
}

Types used only by createOrUpdateLineageNodeReplacementRule

CreateOrUpdateLineageNodeReplacementRule

Object type. Create or update a node replacement rule

FieldTypeDescription
ruleLineageNodeReplacementRuleReplacement rule that was created or updated

Related types

LineageNodeReplacementRule, UUID

deleteLineageNode (mutation)

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

Delete a lineage node and any lineage edges connected to it.

Arguments

ArgumentTypeDescription
mconString!The MCON of the node to be deleted

Returns

DeleteLineageNode

Example

mutation DeleteLineageNode($mcon: String!) {
  deleteLineageNode(mcon: $mcon) {
    objectsDeleted
    nodesDeleted
    edgesDeleted
  }
}

Types used only by deleteLineageNode

DeleteLineageNode

Object type. Delete a lineage node and any lineage edges connected to it.

FieldTypeDescription
objectsDeletedIntTotal number of objects (nodes + edges) deleted
nodesDeletedIntTotal number of nodes deleted
edgesDeletedIntTotal number of edges deleted

deleteLineageNodeBlockPattern (mutation)

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

Delete a lineage node block pattern.

Arguments

ArgumentTypeDescription
uuidUUID!The UUID of the pattern to delete

Returns

DeleteLineageNodeBlockPattern

Example

mutation DeleteLineageNodeBlockPattern($uuid: UUID!) {
  deleteLineageNodeBlockPattern(uuid: $uuid) {
    pattern {
      id
      uuid
      accountId
      resourceId
      datasetRegexp
      projectRegexp
      tableRegexp
      createdTime
      lastUpdateTime
    }
  }
}

Types used only by deleteLineageNodeBlockPattern

DeleteLineageNodeBlockPattern

Object type. Delete a lineage node block pattern.

FieldTypeDescription
patternLineageNodeBlockPattern

Related types

LineageNodeBlockPattern, UUID

deleteLineageNodeCollapsingRule (mutation)

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

Delete a lineage node collapsing rule

Arguments

ArgumentTypeDescription
uuidUUID!The UUID of the collapsing rule to delete

Returns

DeleteLineageNodeCollapsingRule

Example

mutation DeleteLineageNodeCollapsingRule($uuid: UUID!) {
  deleteLineageNodeCollapsingRule(uuid: $uuid) {
    rule {
      createdTime
      updatedTime
      uuid
      accountId
      pattern
      caseInsensitive
    }
  }
}

Types used only by deleteLineageNodeCollapsingRule

DeleteLineageNodeCollapsingRule

Object type. Delete a lineage node collapsing rule

FieldTypeDescription
ruleLineageNodeCollapsingRule

Related types

LineageNodeCollapsingRule, UUID

deleteLineageNodeReplacementRule (mutation)

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

Delete a lineage node replacement rule

Arguments

ArgumentTypeDescription
uuidUUID!The UUID of the replacement rule to delete

Returns

DeleteLineageNodeReplacementRule

Example

mutation DeleteLineageNodeReplacementRule($uuid: UUID!) {
  deleteLineageNodeReplacementRule(uuid: $uuid) {
    rule {
      id
      uuid
      accountId
      resourceId
      pattern
      replacement
      caseInsensitive
      lastUpdateTime
    }
  }
}

Types used only by deleteLineageNodeReplacementRule

DeleteLineageNodeReplacementRule

Object type. Delete a lineage node replacement rule

FieldTypeDescription
ruleLineageNodeReplacementRule

Related types

LineageNodeReplacementRule, UUID

Source: The GraphQL API reference

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