Related queries and mutations in Integrations and connections. Each has its own section.
Queries
runCustomQuery (query)
runCustomQuery 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
Run a SQL query. Results will only be returned if sampling is enabled and allowed for the current user.
Arguments
| Argument | Type | Description |
|---|---|---|
dwId | UUID | warehouse UUID |
connectionId | UUID | connection UUID |
query | String | |
variables | JSONString | If the query is using variables, values to use when running the query. |
queryResultType | QueryResultType | Query result type. Pass a value if you want to validate the query conforms to the expected result type before returning a result. By default, it returnsa COUNT(*) of the provided query. |
Returns
Example
query RunCustomQuery {
runCustomQuery {
columns
rows
hasCustomSqlFilter
query
hasError
error
samplingDisabled
samplingRestricted
contentWithheldReason
rateLimitExceeded
idempotentStatus
downloadUrl
queryExecutionId
}
}Related types
JSONString, QueryResultType, SQLResponse, UUID
runCustomRestRequest (query)
runCustomRestRequest 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
Run a REST API request against the warehouse connection's platform API (e.g. the Snowflake REST API, including Cortex Agents). The request is executed by the data collector using the connection's credentials, and the target host always derives from the connection itself — only a relative path can be provided. The request will not be executed and results will be withheld if the warehouse has granular data sampling configured or if the current user does not have access to raw customer data. Currently supported for Snowflake connections only.
Arguments
| Argument | Type | Description |
|---|---|---|
dwId | UUID | warehouse UUID |
connectionId | UUID | connection UUID |
method | RestRequestMethod! | HTTP method. |
path | String! | Relative API path starting with '/', e.g. /api/v2/databases/DB/schemas/SCH/agents/MY_AGENT:run |
body | JSONString | JSON request body (for POST requests). |
responseFormat | RestResponseFormat | How the response is interpreted: JSON passes the payload through (default); SSE consumes the event stream and returns a parsed event list. |
Returns
RestRequestResponse
Example
query RunCustomRestRequest($method: RestRequestMethod!, $path: String!) {
runCustomRestRequest(method: $method, path: $path) {
statusCode
response
events
hasError
error
samplingDisabled
idempotentStatus
}
}Types used only by runCustomRestRequest
runCustomRestRequestRestRequestMethod
RestRequestMethodEnum type.
| Value | Description |
|---|---|
GET | |
POST |
RestRequestResponse
RestRequestResponseObject type.
| Field | Type | Description |
|---|---|---|
statusCode | Int | HTTP status code returned by the platform API. |
response | JSONString | Raw JSON response payload (when responseFormat is JSON). |
events | JSONString | Parsed list of server-sent events (when responseFormat is SSE); incremental delta events are filtered out. |
hasError | Boolean | If true, an error occurred while executing the request; the error field might include additional details. |
error | String | An error description if an error occurred while executing the request. |
samplingDisabled | Boolean | Indicates the request was not executed and results were withheld: either the warehouse has granular data sampling configured (REST requests cannot be checked per-table) or the current user does not have access to raw customer data. |
idempotentStatus | IdempotentStatus |
RestResponseFormat
RestResponseFormatEnum type.
| Value | Description |
|---|---|
JSON | |
SSE |
Related types
IdempotentStatus, JSONString, UUID
Source: The GraphQL API reference
This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.
