Related queries and mutations in Integrations and connections. Each has its own section.
Queries
getAggregatedQueries (query)
getAggregatedQueries 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 GetMetricsV4 instead
DEPRECATED. Retrieve aggregated metrics
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | MCON for the table |
startTime | DateTime! | Filter for queries on or after this date |
endTime | DateTime! | Filter for queries on or before this date |
queryType | QueryType! | Filter for reads or writes to the table |
limit | Int! | Number of aggregated queries to return. Up to a maximum of 1000 |
endCursor | String | Cursor used to get results from the next page |
category | QueryCategory | Filter queries by category. Matches either the query's category or its sub-category. |
user | String | Filter queries by user |
categories | [QueryCategory!] | Filter queries matching any of these categories. Matches the query's sub-category. The broader category is used only when the query has no sub-category. Combined with category (AND) if both are provided. |
users | [String!] | Filter queries run by any of these users. Combined with user (AND) if both are provided. |
queryCharacters | Int | Number of characters to return for the sample query Default: 50. |
Returns
AggregatedQueryResults
Example
query GetAggregatedQueries($mcon: String!, $startTime: DateTime!, $endTime: DateTime!, $queryType: QueryType!, $limit: Int!) {
getAggregatedQueries(mcon: $mcon, startTime: $startTime, endTime: $endTime, queryType: $queryType, limit: $limit) {
aggregatedQueries {
date
groupId
queryHash
user
category
latestQuery
latestQueryId
latestQueryTimestamp
count
averageRunTime
onDemandRuns
onDemandBytesBilled
reservedRuns
reservedSlotMs
failedRuns
}
}
}Types used only by getAggregatedQueries
getAggregatedQueriesAggregatedQuery
AggregatedQueryObject type.
| Field | Type | Description |
|---|---|---|
date | Date | Date the queries occurred on |
groupId | String | Hash that is shared by all the aggregated queries for writes |
queryHash | String | Hash that is shared by all the aggregated queries for reads |
user | String | User of the aggregated queries |
category | QueryCategory | Category of the aggregated queries |
latestQuery | String | Substring of the latest query from the aggregated group containing the first n characters defined by the query_characters parameter in the request |
latestQueryId | String | ID of the latest query |
latestQueryTimestamp | DateTime | Timestamp of the latest query |
count | Int | Count of the number of queries aggregated |
averageRunTime | Int | Average run time of the aggregated queries in milliseconds |
onDemandRuns | Int | Successful runs billed on demand, by bytes billed. Excludes runs collected before slot time and reservations were recorded. Runs not counted as on demand, reserved or failed have an unknown billing model. Null unless the queries write a BigQuery table |
onDemandBytesBilled | BigInt | Bytes billed across the on-demand runs. Null unless the queries write a BigQuery table |
reservedRuns | Int | Successful runs on reserved BigQuery capacity, which is paid for whether or not it is used. Excludes free load jobs. Null unless the queries write a BigQuery table |
reservedSlotMs | BigInt | Slot time the reserved runs used, in milliseconds. Null unless the queries write a BigQuery table |
failedRuns | Int | Runs that failed. Null when the queries read the table |
AggregatedQueryResults
AggregatedQueryResultsObject type.
| Field | Type | Description |
|---|---|---|
aggregatedQueries | [AggregatedQuery] | List of aggregated queries which are grouped based on their group ID |
pageInfo | NextPageInfo | Data necessary to paginate aggregated queries |
Related types
BigInt, Date, DateTime, NextPageInfo, QueryCategory, QueryType
getQueriedTables (query)
getQueriedTables 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: Experimental
Tables queried in the period, most-queried first. A table path present in more than one warehouse yields one row per warehouse, so limit bounds paths rather than rows.
Arguments
| Argument | Type | Description |
|---|---|---|
startTime | DateTime! | Start of the period to consider |
endTime | DateTime! | End of the period to consider |
limit | Int! | Number of tables to return. |
user | String | Filter queries by user (email) |
restrictToAccessibleDomains | Boolean | Drop tables the caller cannot prove access to. Off by default, which answers over the whole account. limit bounds the table paths read before narrowing, so a restricted caller may receive fewer rows than requested, and a row with no mcon is always dropped. |
Returns
[QueriedTable]
Example
query GetQueriedTables($startTime: DateTime!, $endTime: DateTime!, $limit: Int!) {
getQueriedTables(startTime: $startTime, endTime: $endTime, limit: $limit) {
table
mcon
count
}
}Types used only by getQueriedTables
getQueriedTablesQueriedTable
QueriedTableObject type.
| Field | Type | Description |
|---|---|---|
table | String | Full table ID of the table |
mcon | String | MCON of the table, or null when the catalog does not hold this path (dropped, never ingested, or not a table). |
count | Int | Number of times the table was queried |
Related types
getQueryDimensions (query)
getQueryDimensions 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.
Arguments
| Argument | Type | Description |
|---|---|---|
mcon | String! | Mcon of the table or job to get query dimensions for |
startTime | DateTime! | Filter for queries on or after this date |
endTime | DateTime! | Filter for queries on or before this date |
queryType | QueryType | Filter for reads or writes. Required for a table. Optional for a job: omit it for every query the job ran. |
Returns
QueryDimensions
Example
query GetQueryDimensions($mcon: String!, $startTime: DateTime!, $endTime: DateTime!) {
getQueryDimensions(mcon: $mcon, startTime: $startTime, endTime: $endTime) {
users
categories
}
}Types used only by getQueryDimensions
getQueryDimensionsQueryDimensions
QueryDimensionsObject type.
| Field | Type | Description |
|---|---|---|
users | [String] | A distinct list of users for a list of queries |
categories | [QueryCategory] | A distinct list of query categories for a list of queries |
Related types
DateTime, QueryCategory, QueryType
getQueryRcas (query)
getQueryRcas 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.
Get query RCAs for a given incident.
Arguments
Returns
[QueryRca]
Example
query GetQueryRcas {
getQueryRcas {
tableMcon
groupId
timestamp
type
rcaData
eventUuid
}
}Types used only by getQueryRcas
getQueryRcasQueryRca
QueryRcaObject type. Query RCA result
| Field | Type | Description |
|---|---|---|
tableMcon | String | MCON of affected table |
groupId | String | Identifier for a grouping of like/same queries |
timestamp | DateTime | Time RCA was executed |
type | QueryRcaType | Type of query RCA |
rcaData | JSONString | Get full rca data |
eventUuid | UUID! | The uuid connected of the event the RCA is connected to |
QueryRcaType
QueryRcaTypeEnum type. Types of query RCAs
| Value | Description |
|---|---|
NEW | |
UPDATE | |
FAILED | |
EMPTY | |
UPSTREAM | |
QDR | |
DBT_FAIL_SKIP | |
AFR |
Related types
getQueryText (query)
getQueryText 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.
Arguments
| Argument | Type | Description |
|---|---|---|
key | String! | Query text key |
Returns
String
Example
query GetQueryText($key: String!) {
getQueryText(key: $key)
}Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
