Asset selection and usage (GraphQL)

Related queries and mutations in Monitors. Each has its own section.

Queries

evaluateAssetSelection (query)

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

Status: Experimental

Evaluates an asset selection query and returns a list of asset selection results.

Arguments

ArgumentTypeDescription
warehouseUuidUUID!
assetSelectionAssetSelectionInput!
assetSelectionLevelAssetSelectionLevel!
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.
includeUnselectedBoolean
filterByDatabaseNameString
filterBySchemaNameString
domainRestrictions[UUID!]
searchString
rankByDatabaseSchemaString
searchFullTableIdString
isMonitoredBooleanFilter by monitored status if provided
includeRequireRowCountCollectionBooleanInclude count of tables that require row count collection but do not have it enabled yet (countRowCountCollectionNotEnabled).
limitIntDefault: 100.
offsetIntDefault: 0.

Returns

[AssetSelectionResult!]

Example

query EvaluateAssetSelection($warehouseUuid: UUID!, $assetSelection: AssetSelectionInput!, $assetSelectionLevel: AssetSelectionLevel!) {
  evaluateAssetSelection(warehouseUuid: $warehouseUuid, assetSelection: $assetSelection, assetSelectionLevel: $assetSelectionLevel) {
    name
    id
    type
    count
    countUnselected
    countDatabaseSchema
    selected
    mcon
    countRowCountCollectionNotEnabled
    countRowCountCollectionEnabled
    countRowCountCollectionUserDisabled
  }
}

Types used only by evaluateAssetSelection

AssetSelectionLevel

Enum type.

ValueDescription
WAREHOUSE
DATABASE
SCHEMA
TABLE
AssetSelectionResult

Object type.

FieldTypeDescription
nameString!
idString!
typeString!
countInt!
countUnselectedInt!
countDatabaseSchemaInt!
selectedBoolean!
mconString!
countRowCountCollectionNotEnabledInt!
countRowCountCollectionEnabledInt!
countRowCountCollectionUserDisabledInt!

Related types

AssetSelectionInput, UUID

evaluateFieldPatternMatches (query)

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

Status: Experimental

Evaluates a field pattern against tables from an asset selection and returns matching tables with their matched fields.

Arguments

ArgumentTypeDescription
warehouseUuidUUID!
assetSelectionAssetSelectionInput!
fieldPatternFieldPatternInput!
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.
metricStringOptional metric to filter by compatible field types
domainRestrictions[UUID!]
searchStringOptional search term to filter tables by name

Returns

FieldPatternMatchResult

Example

query EvaluateFieldPatternMatches($warehouseUuid: UUID!, $assetSelection: AssetSelectionInput!, $fieldPattern: FieldPatternInput!) {
  evaluateFieldPatternMatches(warehouseUuid: $warehouseUuid, assetSelection: $assetSelection, fieldPattern: $fieldPattern) {
    tables {
      tableName
      mcon
      fullTableId
      matchingFields
    }
  }
}

Types used only by evaluateFieldPatternMatches

FieldPatternMatchResult

Object type.

FieldTypeDescription
tables[FieldPatternTableMatch!]!
FieldPatternTableMatch

Object type.

FieldTypeDescription
tableNameString!
mconString!
fullTableIdString!
matchingFields[String!]!

Related types

AssetSelectionInput, FieldPatternInput, UUID

getAccountUsage (query)

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

List of account usages per account.

Arguments

ArgumentTypeDescription
startTimeDateTimeStart time is inclusive (timezone in UTC) to get time-bound values for.
endTimeDateTimeEnd time is inclusive (timezone in UTC) to get time-bound values for.

Returns

[AccountUsageObject]

Example

query GetAccountUsage {
  getAccountUsage {
    ingested
    monitored
    timestamp
  }
}

Types used only by getAccountUsage

AccountUsageObject

Object type. Account usage and consumption.

FieldTypeDescription
ingestedInt!Number of ingested tables
monitoredInt!Number of monitored tables
timestampDateTimeTimestamp of the usage record.

Related types

DateTime

getAssetsUsage (query)

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

Use this to get a list of assets. The response will only contain assets of one type. The asset hierarchy is warehouses > databases > schemas > tables. If mcon is given, the response will only contain this object. To get all warehouses, omit both mcon and parentMcon. This assumes the parent to be the account. To get all databases/projects under a warehouse, provide the mcon of the warehouse. To get all schemas/datasets under a database, provide the mcon of the database. To get all tables under a schema, provide the mcon of the schema.

Arguments

ArgumentTypeDescription
mconStringFilter by mcon, returns this single object. Include this or parent_mcon.If neither mcon nor parent_mcon is given, will return warehouses.
parentMconStringOnly include children of this object. Include this or mcon.If neither mcon nor parent_mcon is given, will return warehouses.
offsetIntStarting node index for current page.
limitIntMax nodes to get for page.
displayNameContainsStringTo search a substring of an asset's display name.
filterOptionsAssetsUsageFilterOptionsTo filter results by only ingested/not ingested/monitored/not monitored tables.
sortOptionsAssetsSortInputTo sort results by a field. Default is ascending order.

Returns

AssetsUsageResults

Example

query GetAssetsUsage {
  getAssetsUsage {
    hasNextPage
    nextPageOffset
    groupObjectType
    totalCount
  }
}

Types used only by getAssetsUsage

AssetUsageNode

Object type.

FieldTypeDescription
mconIdStringMCON of the object represented by this node.
displayNameStringUser-friendly display name of the catalog object.
path[String]Object's hierarchy as list of ancestors plus self, if applicable.
schemaCountIsIngestedIntThe number of schemas associated with this node that are ingested.
schemaCountIsNotIngestedIntThe number of schemas associated with this node that are not ingested.
tableCountIntThe number of tables associated with this node.
tableCountIsIngestedIntThe number of tables associated with this node that are ingested.
tableCountIsNotIngestedIntThe number of tables associated with this node that are not ingested.
tableCountIsMonitoredIntThe number of tables associated with this node that are monitored.
tableCountIsNotMonitoredIntThe number of tables associated with this node that are not monitored.
isExcludedBooleanWhether or not a table node is excluded from ingestion control. When it is True, it means that the table is excluded for ingestion.
isMonitoredBooleanWhether or not a table node is monitored. When it is False, it means that the table is not monitored.
importanceScoreFloatThe importance score of the table.
lastActivityDateTimeThe last activity date of the table. When was the last time the table was read or written.
lastReadDateTimeThe last read date of the table. When was the last time the table was read from.
lastWriteDateTimeThe last write date of the table. When was the last time the table was written to .
lastVolumeChangeDateTimeThe last time a significant write was executed on the table
objectProperties[PartialObjectProperty]Properties of the table (like tags).
tableTypeStringThe type of the table.
AssetsSortDirection

Enum type.

ValueDescription
ASC
DESC
AssetsSortInput

Input object type.

FieldTypeDescription
sortFieldString!Field to sort by.
sortDirectionAssetsSortDirectionSort direction. ASC or DESC, default is ASC Default: "ASC".
AssetsUsageFilterOptions

Input object type.

FieldTypeDescription
onlyIngestedTablesBooleanTo filter results that only has ingested tables.
onlyNotIngestedTablesBooleanTo filter results that only does not have ingested tables.
onlyMonitoredTablesBooleanTo filter results that only has monitored tables.
onlyNotMonitoredTablesBooleanTo filter results that only does not have monitored tables.
onlyIngestedSchemasBooleanTo filter results that only has ingested schemas.
onlyNotIngestedSchemasBooleanTo filter results that only does not have ingested schemas.
onlyIngestedDatabasesBooleanTo filter results that only has ingested databases.
onlyNotIngestedDatabasesBooleanTo filter results that only does not have ingested databases.
AssetsUsageResults

Object type.

FieldTypeDescription
nodes[AssetUsageNode]Nodes for current page.
hasNextPageBooleanIf there are more nodes.
nextPageOffsetIntWhere to start for next page, if next page exists.
groupObjectTypeStringObject type of the group, when grouping by type.
totalCountIntTotal number of nodes.
PartialObjectProperty

Object type.

FieldTypeDescription
propertyNameStringName of the attached property
propertyValueStringValue of the attached property

Related types

DateTime

getNotMonitoredReason (query)

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

Explain a reason behind an asset not being monitored

Arguments

ArgumentTypeDescription
mconString!MCON of the asset

Returns

NotMonitoredReason

Example

query GetNotMonitoredReason($mcon: String!) {
  getNotMonitoredReason(mcon: $mcon) {
    mcon
    reason
  }
}

Types used only by getNotMonitoredReason

IsNotMonitoredReason

Enum type.

ValueDescription
NO_REASON_FOUND
ACCOUNT_NOT_BASED_ON_MONITORING
NOT_MONITORABLE_OTHER
NON_MONITORABLE_BI
NOT_FOUND_IN_METADATA_COLLECTION_OTHER
INGESTION_EXCLUSION_RULE_OTHER
MONITORING_EXCLUSION_RULE_OTHER
MONITORING_INCLUSION_MISSING_OTHER
NotMonitoredReason

Object type.

FieldTypeDescription
mconStringMCON of the asset
reasonIsNotMonitoredReasonReason why the asset is not monitored
ruleMonitoredTableRuleObjectThe rule that caused the asset to be not monitored Deprecated: Monitoring rules were removed; always null..

Related types

MonitoredTableRuleObject

Source: The GraphQL API reference

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