Tables and assets, part 1 of 2 (GraphQL)

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

Queries

getCommonFields (query)

getCommonFields 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.

Get fields that are common across a set of tables.

Arguments

ArgumentTypeDescription
mcons[String]The tables to inspect. All tables must belong to the same warehouse.

Returns

[String]

Example

query GetCommonFields {
  getCommonFields
}

getCommonFieldsV2 (query)

getCommonFieldsV2 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.

Get fields that are common across a set of tables. Either provide 'mcons' directly, or provide 'warehouseUuid' + 'assetSelection' to resolve tables from asset selection criteria. These inputs are mutually exclusive.

Arguments

ArgumentTypeDescription
mcons[String]The tables to inspect. All tables must belong to the same warehouse.
warehouseUuidUUIDUUID of the warehouse. Required when using assetSelection, mutually exclusive with mcons.
assetSelectionAssetSelectionInputAsset selection criteria to resolve tables. Required when using warehouseUuid, mutually exclusive with mcons.
monitorUuidUUIDUUID of the table or bulk monitor being edited. When set, joiner keys omitted from assetSelection are filled from the stored monitor, matching the save mutation. Only used with assetSelection.
domainRestrictions[UUID!]Optional domain restrictions. Only used with warehouseUuid + assetSelection.

Returns

TableFields

Example

query GetCommonFieldsV2 {
  getCommonFieldsV2 {
    tableFields {
      fieldName
      sqlName
      fieldTypeDb
      fieldType
    }
  }
}

Types used only by getCommonFieldsV2

TableFieldDescriptor

Object type. Information about the table fields

FieldTypeDescription
fieldNameStringDisplay name
sqlNameStringField identifier
fieldTypeDbStringField type as fetched from the warehouse metadata
fieldTypeFieldTypeDisplay field type
TableFields

Object type.

FieldTypeDescription
tableFields[TableFieldDescriptor]

Related types

AssetSelectionInput, FieldType, UUID

getConnectedMconLineage (query)

getConnectedMconLineage 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.

Get mcon and and directly connected mcons

Arguments

ArgumentTypeDescription
mcons[String]!
directionLineageGraphTraversalDirectionThis can be either 'upstream' or 'downstream' or 'both' based on the direction in which to traverse the lineage graph. Default to 'upstream'.
levelsIntThe number of hops to query in the lineage graph. Defaults to 1. Default: 1.

Returns

ConnectedMcons

Example

query GetConnectedMconLineage($mcons: [String]!) {
  getConnectedMconLineage(mcons: $mcons) {
    connectedMcons {
      mcon
      importanceScore
    }
  }
}

Types used only by getConnectedMconLineage

ConnectedMcons

Object type.

FieldTypeDescription
connectedMcons[LineageMconNode]List of mcons
LineageMconNode

Object type.

FieldTypeDescription
mconString!MC resource identifier
importanceScoreFloatEntity importance score

Related types

LineageGraphTraversalDirection

getCustomSqlOutputDownload (query)

getCustomSqlOutputDownload 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.

Runs custom sql rule and returns a download link for all results.

Arguments

ArgumentTypeDescription
dwIdUUID!Warehouse the custom SQL ran in
customRuleUuidUUID!Custom rule to run
eventUuidUUIDBreach event whose captured runtime variable values should be substituted into the SQL before execution. Required for custom SQL rules that use runtime template variables (e.g. {effective_date}); omit for rules without runtime variables.

Returns

CustomSQLOutputDownload

Example

query GetCustomSqlOutputDownload($dwId: UUID!, $customRuleUuid: UUID!) {
  getCustomSqlOutputDownload(dwId: $dwId, customRuleUuid: $customRuleUuid) {
    samplingDisabled
    downloadUrl
  }
}

Types used only by getCustomSqlOutputDownload

CustomSQLOutputDownload

Object type.

FieldTypeDescription
samplingDisabledBoolean
downloadUrlStringLink to download the query response which expires in 5 minutes.

Related types

UUID

getDataLakeCatalogMappings (query)

getDataLakeCatalogMappings 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

Get catalog mappings for a connection

Arguments

ArgumentTypeDescription
connectionUuidUUID!Connection UUID

Returns

CatalogMappings

Example

query GetDataLakeCatalogMappings($connectionUuid: UUID!) {
  getDataLakeCatalogMappings(connectionUuid: $connectionUuid) {
    databaseMappings {
      fromName
      toName
    }
  }
}

Types used only by getDataLakeCatalogMappings

CatalogMapping

Object type.

FieldTypeDescription
fromNameStringFrom catalog object name.
toNameStringTo catalog object name.
CatalogMappings

Object type.

FieldTypeDescription
databaseMappings[CatalogMapping]

Related types

UUID

getDigraph (query)

getDigraph 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.

Arguments

ArgumentTypeDescription
metadataVersionString

Returns

DirectedGraph

Example

query GetDigraph {
  getDigraph {
    vertices
    edges
  }
}

Types used only by getDigraph

DirectedGraph

Object type.

FieldTypeDescription
verticesString
edgesString

getDownstreamAgents (query)

getDownstreamAgents 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

Gets the agents downstream of a list of tables, up to 25. Tables the user can't read lineage on are skipped.

Arguments

ArgumentTypeDescription
mcons[String!]!List of MCONs where each MCON identifies a table whose downstream agents are being queried.

Returns

DownstreamAgents

Example

query GetDownstreamAgents($mcons: [String!]!) {
  getDownstreamAgents(mcons: $mcons) {
    hasMore
  }
}

Types used only by getDownstreamAgents

DownstreamAgent

Object type.

FieldTypeDescription
mconString!MCON of the trace table or platform agent that, with the agent name, identifies the agent.
agentNameString!Name of the agent
DownstreamAgents

Object type.

FieldTypeDescription
agents[DownstreamAgent!]!Agents downstream of the tables, ordered by agent name
hasMoreBoolean!Whether more downstream agents exist than were returned

getDownstreamBi (query)

getDownstreamBi 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.

Arguments

ArgumentTypeDescription
dwIdUUID
nodeIds[String]
startTimeDateTime
endTimeDateTime

Returns

[DownstreamBI]

Example

query GetDownstreamBi {
  getDownstreamBi {
    nodeId
    fullTableId
  }
}

Types used only by getDownstreamBi

BiLineage

Object type.

FieldTypeDescription
workbookIdString
friendlyNameString
contentUrlString
ownerIdString
projectIdString
projectNameString
createdDateTime
updatedDateTime
totalViewsInt
workbookCreators[String]
viewIdString
categoryStringNode type
mconStringMonte Carlo object name
nameStringObject name (table name, report name, etc)
displayNameStringFriendly display name
DownstreamBI

Object type.

FieldTypeDescription
nodeIdString
fullTableIdString
downstreamBi[BiLineage]

Related types

DateTime, UUID

getDownstreamImpactRadiusSummary (query)

getDownstreamImpactRadiusSummary 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.

Arguments

ArgumentTypeDescription
mcons[String]!List of MCONs where each MCON identifies a table whose downstream reports are being queried.

Returns

DownstreamImpactRadiusSummary

Example

query GetDownstreamImpactRadiusSummary($mcons: [String]!) {
  getDownstreamImpactRadiusSummary(mcons: $mcons) {
    totalUsersAffected
    totalReportsAffected
  }
}

Types used only by getDownstreamImpactRadiusSummary

DownstreamImpactRadiusSummary

Object type.

FieldTypeDescription
totalUsersAffectedIntNumber of users affected
totalReportsAffectedIntNumber of reports affected

getDownstreamReportOwners (query)

getDownstreamReportOwners 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.

Gets owners of downstream reports for a list of tables.

Arguments

ArgumentTypeDescription
mcons[String]!List of MCONs where each MCON identifies a table whose downstream report owners are being queried.
limitIntLimit results returned
offsetIntOffset when paging

Returns

DownstreamReportOwners

Example

query GetDownstreamReportOwners($mcons: [String]!) {
  getDownstreamReportOwners(mcons: $mcons) {
    ownerIds
    hasNextPage
    limit
    offset
  }
}

Types used only by getDownstreamReportOwners

DownstreamReportOwners

Object type.

FieldTypeDescription
ownerIds[String]!Owner ID of a BI report
hasNextPageBooleanWhether more pages of results exist. Used for pagination.
limitIntLimit results returned
offsetIntOffset when paging

getDownstreamReports (query)

getDownstreamReports 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.

Gets downstream reports for a list of tables.

Arguments

ArgumentTypeDescription
mcons[String]!List of MCONs where each MCON identifies a table whose downstream reports are being queried.
nameMatcherStringA string to filter names by performing substring match.
reportTypes[String]Report types to query.
limitIntLimit results returned
offsetIntOffset when paging
sortByStringSort by property: [last_updated, owner_id, display_name, type, importance_score]
sortDescBooleanSort in descending order

Returns

DownstreamReports

Example

query GetDownstreamReports($mcons: [String]!) {
  getDownstreamReports(mcons: $mcons) {
    limit
    offset
    hasNextPage
  }
}

Types used only by getDownstreamReports

DownstreamReport

Object type.

FieldTypeDescription
mconString!MCON of the report.
displayNameString!Display name of the report
reportTypeStringType of the report
objectIdStringID of the object
ownerIdStringID of the owner of this object
isCustomBooleanIndicates whether this is a custom lineage node (created by a user)
importanceScoreFloatImportance score of the report
tableauMetadataTableauMetadataMetadata for Tableau objects
DownstreamReports

Object type.

FieldTypeDescription
downstreamReports[DownstreamReport]List of downstream reports
limitIntLimit results returned
offsetIntOffset when paging
hasNextPageBooleanWhether more pages of results exist. Used for pagination.
TableauMetadata

Object type.

FieldTypeDescription
tableauLuidStringTableau LUID of a Tableau asset
tableauAssetTypeStringTableau asset type
tableauWarningIdStringTableau Data Quality Warning ID if there is one

getDownstreamReportTypes (query)

getDownstreamReportTypes 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.

Gets all report types of downstream reports for a table.

Arguments

ArgumentTypeDescription
mconStringMCON of the table whose downstream reports are being queried.
mcons[String]List of MCONs of the tables whose downstream reports are being queried.

Returns

DownstreamReportTypes

Example

query GetDownstreamReportTypes {
  getDownstreamReportTypes {
    downstreamReportTypes
  }
}

Types used only by getDownstreamReportTypes

DownstreamReportTypes

Object type.

FieldTypeDescription
downstreamReportTypes[String]List of distinct downstream report types.

getFhReproductionQuery (query)

getFhReproductionQuery 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.

Generates a SQL query that will reproduce the anomalous data on a table

Arguments

ArgumentTypeDescription
monitorUuidUUID!UUID of the monitor on which the anomaly occurred
eventCreatedTimeDateTime!When the anomaly occurred
fieldString!The field on which the anomaly was found
metricString!The metric which measured the anomaly
dimensionStringFH segment if segmented monitor
dryRunBooleanGenerate sample query without running Default: true.

Returns

InvestigationQuery

Example

query GetFhReproductionQuery($monitorUuid: UUID!, $eventCreatedTime: DateTime!, $field: String!, $metric: String!) {
  getFhReproductionQuery(monitorUuid: $monitorUuid, eventCreatedTime: $eventCreatedTime, field: $field, metric: $metric) {
    query
    hasError
  }
}

Types used only by getFhReproductionQuery

InvestigationQuery

Object type.

FieldTypeDescription
queryString
hasErrorBoolean

Related types

DateTime, UUID

getLineageNodeProperties (query)

getLineageNodeProperties 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.

Get properties (metadata) from nodes (DEPRECATED, use GetMetadata instead!)

Arguments

ArgumentTypeDescription
dwIdUUIDWarehouse the asset is contained within. Not required when using an mcon as node id
nodeIds[String]Deprecated - use mcon. Ignored if mcon is present
mcons[String]List of mcons to get properties for

Returns

[NodeProperties]

Example

query GetLineageNodeProperties {
  getLineageNodeProperties {
    workbookId
    friendlyName
    contentUrl
    ownerId
    projectId
    projectName
    created
    updated
    totalViews
    workbookCreators
    viewId
    category
    mcon
    name
    displayName
    tableId
    dataSet
    nodeId
    resource
    sampling
  }
}

Types used only by getLineageNodeProperties

NodeProperties

Object type.

FieldTypeDescription
workbookIdString
friendlyNameString
contentUrlString
ownerIdString
projectIdString
projectNameString
createdDateTime
updatedDateTime
totalViewsInt
workbookCreators[String]
viewIdString
categoryStringNode type
mconStringMonte Carlo object name
nameStringObject name (table name, report name, etc)
displayNameStringFriendly display name
tableIdString
dataSetString
nodeIdStringLineage node id, to be deprecated in favor of MCONs
resourceStringResource containing this object (warehouse, Tableau account, etc)
sampling[String]A subset of the nodes that were collapsed into a node, only present on nodes of type collapsed-etl or collapsed-ext

Related types

DateTime, UUID

getLineageNodeTypes (query)

getLineageNodeTypes 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: General availability

Counts of upstream and downstream nodes grouped by type

Arguments

ArgumentTypeDescription
mconString!MCON for which to fetch the counts

Returns

LineageNodeTypeStats

Example

query GetLineageNodeTypes($mcon: String!) {
  getLineageNodeTypes(mcon: $mcon) {
    nodeTypeStats {
      objectType
      count
    }
  }
}

Types used only by getLineageNodeTypes

LineageNodeTypeStat

Object type.

FieldTypeDescription
objectTypeStringType of element object
countIntNumber of elements of object_type
LineageNodeTypeStats

Object type.

FieldTypeDescription
nodeTypeStats[LineageNodeTypeStat]Stats for node types

getMetadata (query)

getMetadata 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.

Arguments

ArgumentTypeDescription
mcons[String]

Returns

[ObjectDocument]

Example

query GetMetadata {
  getMetadata {
    mcon
    resourceId
    objectId
    objectType
    displayName
  }
}

Related types

ObjectDocument

getObject (query)

getObject 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.

Arguments

ArgumentTypeDescription
mconString

Returns

ObjectDocument

Example

query GetObject {
  getObject {
    mcon
    resourceId
    objectId
    objectType
    displayName
  }
}

Related types

ObjectDocument

getQueryById (query)

getQueryById 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.

Gets the query by query ID

Arguments

ArgumentTypeDescription
queryIdString!Query unique identifier
timestampDateTime!Query execution time (can be reduced to day on which it ran)
queryFormatString'raw' or 'base64' format

Returns

[QueryDataObject]

Example

query GetQueryById($queryId: String!, $timestamp: DateTime!) {
  getQueryById(queryId: $queryId, timestamp: $timestamp) {
    queryId
    groupId
    userName
    timestamp
    query
    sourceDisplayName
    destinationDisplayName
    errorCode
    errorMsg
  }
}

Related types

DateTime, QueryDataObject

getQueryByQueryHash (query)

getQueryByQueryHash 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.

Gets the query by query hash

Arguments

ArgumentTypeDescription
queryHashString!The query_hash for which to fetch query data
dayDate!The day on which the query ran
queryFormatString'raw' or 'base64' format

Returns

[QueryDataObject]

Example

query GetQueryByQueryHash($queryHash: String!, $day: Date!) {
  getQueryByQueryHash(queryHash: $queryHash, day: $day) {
    queryId
    groupId
    userName
    timestamp
    query
    sourceDisplayName
    destinationDisplayName
    errorCode
    errorMsg
  }
}

Related types

Date, QueryDataObject

getQueryData (query)

getQueryData 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.

Fetch query metadata for a single query for all daily occurrences

Arguments

ArgumentTypeDescription
queryIdStringThe query_id for which to fetch the queries
queryHashStringThe query_hash for which to fetch the queries
dayDate!The day for which to fetch the query metadata
limitIntLimit results returned
offsetIntOffset when paging
groupIdStringFetch queries that share the same group_id

Returns

[QueryLogResponse]

Example

query GetQueryData($day: Date!) {
  getQueryData(day: $day) {
    offset
  }
}

Related types

Date, QueryLogResponse

getQueryDataByQueryHash (query)

getQueryDataByQueryHash 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.

Fetch query metadata for a single query for all daily occurrences

Arguments

ArgumentTypeDescription
queryHashString!The query_hash for which to fetch the queries
dayDate!The day for which to fetch the query metadata
limitIntLimit results returned
offsetIntOffset when paging

Returns

[QueryLogResponse]

Example

query GetQueryDataByQueryHash($queryHash: String!, $day: Date!) {
  getQueryDataByQueryHash(queryHash: $queryHash, day: $day) {
    offset
  }
}

Related types

Date, QueryLogResponse

getQueryList (query)

getQueryList 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.

Gets the queries on a table, or the queries a job ran

Arguments

ArgumentTypeDescription
queryTypeStringsource (reads) or destination (writes). Required for a table. Optional for a job: omit it for every query the job ran.
mconString!Monte Carlo object name of a table or job
startTimeDateTime!Filter for queries newer than this
endTimeDateTime!Filter for queries older than this
userNameString[DEPRECATED] Filter by user name
limitIntLimit results returned
offsetIntOffset when paging
users[String]Filter by users
subCategories[String]Filter by subcategory
sortFields[String]List of fields to sort by

Returns

[QueryListResponse]

Example

query GetQueryList($mcon: String!, $startTime: DateTime!, $endTime: DateTime!) {
  getQueryList(mcon: $mcon, startTime: $startTime, endTime: $endTime) {
    offset
    total
    timeline
  }
}

Types used only by getQueryList

QueryListObject

Object type.

FieldTypeDescription
queryIdString
userNameString
timestampDateTime
queryLengthInt
queryHashString
groupHashString
subCategoryString
querySnippetString
runtimeInt
startTimeDateTimeWhen the query started running, in UTC. Falls back to timestamp when the warehouse didn't report a separate start. For BigQuery, timestamp is the job's creation time.
endTimeDateTimeWhen the query finished, in UTC. Null when the warehouse didn't report it.
clusterNumberIntSnowflake warehouse cluster the query ran on. Null for other warehouses and for queries collected before this was kept.
warehouseNameStringSnowflake warehouse the query ran on. Null for other warehouses and for queries collected without it.
databricksWarehouseIdStringDatabricks SQL warehouse the query ran on. Null for other warehouses, for queries on other Databricks compute, and for queries collected without it.
rowsProducedBigInt
rowsUpdatedBigInt
rowsInsertedBigInt
rowsDeletedBigInt
bytesDeletedBigInt
rowsProducedFloatFloat
rowsUpdatedFloatFloat
rowsInsertedFloatFloat
rowsDeletedFloatFloat
bytesDeletedFloatFloat
statusString
jobRunIdStringSource id of the job run that issued the query. Set only when listing a job's queries.
etlJobRunEtlJobRunV3The job run that issued the query. Null until Monte Carlo ingests the run, and outside a job's queries.
etlTaskEtlTaskV3The job task that issued the query. Null until Monte Carlo ingests its run, and outside a job's queries.
QueryListResponse

Object type.

FieldTypeDescription
queries[QueryListObject]
queriesByType[QueryMapObject]
offsetInt
totalInt
timeline[String]
QueryMapObject

Object type.

FieldTypeDescription
queries[QueryListObject]
queryLengthInt

Related types

BigInt, DateTime, EtlJobRunV3, EtlTaskV3

getReducedDownstreamLineage (query)

getReducedDownstreamLineage 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: General availability

Reduces a list of nodes to the most downstream ones

Arguments

ArgumentTypeDescription
mcons[String]!A list of nodes to check

Returns

[String]

Example

query GetReducedDownstreamLineage($mcons: [String]!) {
  getReducedDownstreamLineage(mcons: $mcons)
}

getRelatedUsers (query)

getRelatedUsers 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.

Get users related to object

Arguments

ArgumentTypeDescription
mconString!Monte Carlo object name
startTimeDateTimeFilter for queries newer than this. By default, endTime - 3 weeks
endTimeDateTimeFilter for queries older than this. By default, now
queryTypeStringsource (reads on the table) or destination (writes on this table)

Returns

[RelatedUserCount]

Example

query GetRelatedUsers($mcon: String!) {
  getRelatedUsers(mcon: $mcon) {
    user
    count
  }
}

Types used only by getRelatedUsers

RelatedUserCount

Object type.

FieldTypeDescription
userString
countInt

Related types

DateTime

getResource (query)

getResource 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 specific resource

Arguments

ArgumentTypeDescription
uuidUUIDThe resource id
nameStringThe resource name

Returns

Resource

Example

query GetResource {
  getResource {
    uuid
    name
    type
    isUserProvided
    isDefault
    createdTime
    lastUpdateTime
    id
  }
}

Related types

Resource, UUID

getResources (query)

getResources 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 all resources in an account

Returns

[Resource]

Example

query GetResources {
  getResources {
    uuid
    name
    type
    isUserProvided
    isDefault
    createdTime
    lastUpdateTime
    id
  }
}

Related types

Resource

getSegmentedWhereConditionLabelCount (query)

getSegmentedWhereConditionLabelCount 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

Get approximate segmented where_condition count for a metric monitor. Higher counts may not be exact for performance reasons.

Arguments

ArgumentTypeDescription
monitorUuidUUID!The monitor for which to locate labels
warehouseUuidUUIDDEPRECATED
includeTerms[String!]Filter to segments where all terms are present in segment fields
metricStringFilter to this metric

Returns

Int!

Example

query GetSegmentedWhereConditionLabelCount($monitorUuid: UUID!) {
  getSegmentedWhereConditionLabelCount(monitorUuid: $monitorUuid)
}

Related types

UUID

getSegmentedWhereConditionLabels (query)

getSegmentedWhereConditionLabels 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.

Get segmented where_conditions for a metric monitor

Arguments

ArgumentTypeDescription
monitorUuidUUID!The monitor for which to locate labels
warehouseUuidUUIDDEPRECATED
firstIntNumber of results to return (default/max: 10,000)
afterStringFetch batch of 'first' results after this value
includeTerms[String!]Filter to segments where all terms are present in segment fields
metricStringFilter to this metric

Returns

[WhereConditionSegments]

Example

query GetSegmentedWhereConditionLabels($monitorUuid: UUID!) {
  getSegmentedWhereConditionLabels(monitorUuid: $monitorUuid) {
    timeSeriesUuids
    whereConditions
    lastWhereCondition
  }
}

Types used only by getSegmentedWhereConditionLabels

WhereConditionSegments

Object type.

FieldTypeDescription
timeSeriesUuids[UUID!]!
whereConditions[String]
lastWhereConditionStringValue to use as 'after' for pagination

Related types

UUID

getTable (query)

getTable 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.

Get information about a table

Arguments

ArgumentTypeDescription
dwIdUUIDWarehouse the table is contained in. Required when using a fullTableId
fullTableIdStringDeprecated - use mcon. Ignored if mcon is present
mconStringMcon for table to get details for

Returns

WarehouseTable

Example

query GetTable {
  getTable {
    id
    tableId
    fullTableId
    discoveredTime
    friendlyName
    location
    projectName
    dataset
    originalTableId
    originalProjectName
    originalDataset
    description
    tableType
    isEncrypted
    createdTime
    lastModified
    viewQuery
    viewIsMaterialized
    labels
    path
  }
}

Related types

UUID, WarehouseTable

getTableauWorkbookCount (query)

getTableauWorkbookCount 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.

Gets the number of workbooks in a Tableau instance.

Arguments

ArgumentTypeDescription
biContainerIdUUID!Monte Carlo UUID of the Tableau BI container

Returns

TableauWorkbookCount

Example

query GetTableauWorkbookCount($biContainerId: UUID!) {
  getTableauWorkbookCount(biContainerId: $biContainerId) {
    workbookCount
  }
}

Types used only by getTableauWorkbookCount

TableauWorkbookCount

Object type.

FieldTypeDescription
workbookCountIntTotal number of workbooks in the Tableau instance.

Related types

UUID

getTableFieldsImportance (query)

getTableFieldsImportance 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.

Arguments

ArgumentTypeDescription
mconString!
importanceScoreCutoffFloat
limitInt
fieldTypes[FieldType!]Filter to these field types

Returns

TableFieldsImportance

Example

query GetTableFieldsImportance($mcon: String!) {
  getTableFieldsImportance(mcon: $mcon) {
    tableFields {
      fieldName
      isImportant
      importanceScore
      fieldTypeDb
      fieldType
      mode
    }
  }
}

Types used only by getTableFieldsImportance

TableFieldImportance

Object type. Information about the table fields with an important flag

FieldTypeDescription
fieldNameStringDisplay name
isImportantBoolean
importanceScoreFloat
fieldTypeDbStringField type as fetched from the warehouse metadata
fieldTypeFieldTypeDisplay field type
modeStringField mode from the warehouse metadata (e.g. NULLABLE, REQUIRED, REPEATED)
TableFieldsImportance

Object type.

FieldTypeDescription
tableFields[TableFieldImportance]

Related types

FieldType

getTableLineage (query)

getTableLineage 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.

Gets the lineage for an asset up to specified number of hops in the lineage graph.

Arguments

ArgumentTypeDescription
mconStringMCON of the asset whose lineage is being queried. Must provide either mcon or mcons.
mcons[String]MCONs of the assets whose lineage is being queried to a maximum of 12. Must provide either mcons or mcon.
directionString!This can be either 'upstream' or 'downstream' based on the direction in which to traverse the lineage graph
hopsIntThe number of hops to query in the lineage graph. Defaults to 1.
startTimeDateTimeFilter for lineage data newer than this. Defaults to no date filtering.
endTimeDateTimeFilter for lineage data older than this. Defaults to no date filtering.
limitIntMaximum number of connected nodes to return. Defaults to 500 Default: 500.
filters[LineageFilter]List of lineage filters Default: [].
agentNameStringAgent name to scope the lineage query to within the supplied trace-table MCON. When provided, the query returns lineage rooted at the named agent. Requires exactly one mcon.
toolCalls[String!]Tool call names that should appear in the agent's lineage tree. A single name additionally focuses the response on that tool (its upstream data tables / downstream agent). Two or more names render those tools alongside the agent. Requires agentName.

Returns

LineageGraph

Example

query GetTableLineage($direction: String!) {
  getTableLineage(direction: $direction) {
    baseNode {
      mcon
      displayName
      hasDownstreamNodes
      hasUpstreamNodes
      objectType
      isCustom
      jobTs
      expireAt
      isMonitored
      isExcluded
      lastActivity
      elementId
      agentName
      toolCall
      biAssetType
    }
  }
}

Types used only by getTableLineage

FlattenedLineageGraphEdges

Object type.

FieldTypeDescription
mconString!Monte Carlo full identifier for an entity
directlyConnectedMcons[String]MCONs of nodes directly connected to the entity
directlyConnectedNodes[LineageGraphEdgeNode]Nodes directly connected to the entity, including edge properties
agentNameStringAgent name of the source node, when the source is an agent or tool-call node. Lets callers disambiguate adjacency entries that share an mcon.
toolCallStringTool-call name of the source node, set only on tool-call sources.
LineageGraph

Object type.

FieldTypeDescription
baseNodeLineageGraphNodeThis is the base node for which lineage is fetched. If there are multiples nodes requested this is the first one.
baseNodes[LineageGraphNode]These are the base nodes for which lineages are fetched
connectedNodes[LineageGraphNode]List of nodes connected to the base node. This could be nodes that are multiple hops away from the base node in the graph in cases where nodes at multiple hops were queried.
flattenedEdges[FlattenedLineageGraphEdges]Each entry is an mcon and a list of mcons it is directly connected to
LineageGraphEdgeNode

Object type.

FieldTypeDescription
mconString!Target MCON of this edge
jobs[LineageEdgeJob]!Jobs associated to this edge
hiddenIntThe number of hidden nodes for virtual/collapsed edges
agentNameStringAgent name of the target node, when the target is an agent or tool-call node. Lets callers disambiguate targets that share an mcon.
toolCallStringTool-call name of the target node, set only on tool-call targets.

Related types

DateTime, LineageEdgeJob, LineageFilter, LineageGraphNode

getTableLineageJobs (query)

getTableLineageJobs 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

Get jobs attached to lineage nodes or edges

Arguments

ArgumentTypeDescription
nodeMcons[String]Table MCONs to query job information for. Supply this OR edges.
edges[LineageEdgeInput]Edges to query job information for. Supply this OR node_mcons.

Returns

LineageGraphNodesEdgesJobs

Example

query GetTableLineageJobs {
  getTableLineageJobs {
    nodes {
      mcon
    }
  }
}

Types used only by getTableLineageJobs

LineageEdgeInput

Input object type.

FieldTypeDescription
sourceMconString!Source table MCON of an edge
destinationMconString!Destination table MCON of an edge
LineageGraphEdgeJobs

Object type.

FieldTypeDescription
sourceMconString!
destinationMconString!
jobs[LineageEdgeJob]!Jobs associated to this edge
LineageGraphNodeJobs

Object type.

FieldTypeDescription
mconString!Table MCON
jobs[LineageNodeJob]List of jobs
modelExecutionStatusLineageGraphNodeModelExecutionStatusThe most recent model execution status information which affected this table (e.g. DBT model)
LineageGraphNodesEdgesJobs

Object type.

FieldTypeDescription
nodes[LineageGraphNodeJobs]Lineage nodes with jobs
edges[LineageGraphEdgeJobs]Lineage edges with jobs

Related types

LineageEdgeJob, LineageGraphNodeModelExecutionStatus, LineageNodeJob

getTableLineageV2 (query)

getTableLineageV2 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: General availability

Load the whole lineage in one go, upstream.

Arguments

ArgumentTypeDescription
mcons[String]!MCONs of the tables whose lineage is being queried to a maximum of 12. Must provide either mcons or mcon.
directionLineageGraphTraversalDirection!This can be either 'upstream', 'downstream' based on the direction in which to traverse the lineage graph
filters[LineageFilter]List of lineage filters
agentNameStringAgent name to scope the lineage query to within the supplied trace-table MCON. When provided, the query returns lineage rooted at the named agent. Requires exactly one mcon.
toolCalls[String!]Tool call names that should appear in the agent's lineage tree. A single name additionally focuses the response on that tool (its upstream data tables / downstream agent). Two or more names render those tools alongside the agent. Requires agentName.

Returns

NodeEdgeGraph

Example

query GetTableLineageV2($mcons: [String]!, $direction: LineageGraphTraversalDirection!) {
  getTableLineageV2(mcons: $mcons, direction: $direction) {
    nodes {
      mcon
      displayName
      hasDownstreamNodes
      hasUpstreamNodes
      objectType
      isCustom
      jobTs
      expireAt
      isMonitored
      isExcluded
      lastActivity
      elementId
      agentName
      toolCall
      biAssetType
    }
  }
}

Types used only by getTableLineageV2

GraphEdge

Object type.

FieldTypeDescription
sourceString
destinationString
sourceIdInt
destinationIdInt
hiddenBoolean
NodeEdgeGraph

Object type.

FieldTypeDescription
nodes[LineageGraphNode]Lineage nodes
edges[GraphEdge]Lineage edges

Related types

LineageFilter, LineageGraphNode, LineageGraphTraversalDirection

getTableLineageV3 (query)

getTableLineageV3 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: General availability

Load the whole lineage in one go, upstream.

Arguments

ArgumentTypeDescription
mcons[String]!MCONs of the tables whose lineage is being queried to a maximum of 12. Must provide either mcons or mcon.
directionLineageGraphTraversalDirection!This can be either 'upstream', 'downstream' based on the direction in which to traverse the lineage graph
filters[LineageFilter]List of lineage filters

Returns

NodeEdgeStrings

Example

query GetTableLineageV3($mcons: [String]!, $direction: LineageGraphTraversalDirection!) {
  getTableLineageV3(mcons: $mcons, direction: $direction) {
    nodesStr
    edgesStr
  }
}

Types used only by getTableLineageV3

NodeEdgeStrings

Object type.

FieldTypeDescription
nodesStrStringString containing JSON of nodes
edgesStrStringString containing JSON of edges

Related types

LineageFilter, LineageGraphTraversalDirection

getTableLineageV4 (query)

getTableLineageV4 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: General availability

Load the whole lineage in one go and return it as CSV data.

Arguments

ArgumentTypeDescription
mcons[String]!MCONs of the tables whose lineage is being queried to a maximum of 12.
directionLineageGraphTraversalDirection!This can be either 'upstream', 'downstream' based on the direction in which to traverse the lineage graph
filters[LineageFilter]List of lineage filters

Returns

NodeEdgeCSVStrings

Example

query GetTableLineageV4($mcons: [String]!, $direction: LineageGraphTraversalDirection!) {
  getTableLineageV4(mcons: $mcons, direction: $direction) {
    nodesStr
    edgesStr
  }
}

Types used only by getTableLineageV4

NodeEdgeCSVStrings

Object type.

FieldTypeDescription
nodesStrStringString containing CSV of nodes
edgesStrStringString containing CSV of edges

Related types

LineageFilter, LineageGraphTraversalDirection

getTables (query)

getTables 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.

Get tables in account

Arguments

ArgumentTypeDescription
dwIdUUIDFilter by a specific warehouse
searchStringFilter by partial asset names (e.g. dataset)
status[String]Filter by table statuses
domainIdUUIDFilter by domain UUID
mcons[String]Filter by a list of mcons
offsetInt
beforeString
afterString
firstInt
lastInt
tableIdString
fullTableIdString
warehouseID
discoveredTimeDateTime
friendlyNameString
locationString
projectNameString
datasetString
originalTableIdString
originalProjectNameString
originalDatasetString
descriptionString
tableTypeString
isEncryptedBoolean
createdTimeDateTime
lastModifiedDateTime
viewQueryString
viewIsMaterializedBoolean
pathString
priorityInt
trackedBoolean
dynamicTableBoolean
isDeletedBoolean
deletedAtDateTime
lastObservedDateTime
isExcludedBoolean
isMonitoredBoolean
dataProviderString
ingestTypeString
ingestInvocationIdString
mconString
importanceScoreFloat
isImportantBoolean
lastActivityDateTime
lastReadDateTime
lastWriteDateTime
lastVolumeChangeDateTime
importanceScoreIsCustomBoolean
isImportantIsCustomBoolean
lastObserved_GtDateTime
freshnessAnomalyBoolean
sizeAnomalyBoolean
metricAnomalyBoolean
freshnessSizeAnomalyBoolean
orderByStringOrdering

Returns

WarehouseTableConnection

Example

query GetTables {
  getTables {
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}

Related types

DateTime, UUID, WarehouseTableConnection

Source: The GraphQL API reference

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