Data maintenance windows (GraphQL)

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

Queries

getDataMaintenanceEntries (query)

getDataMaintenanceEntries 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

Fetch all exclusion windows for the given warehouse

Arguments

ArgumentTypeDescription
dwIdUUIDWarehouse UUID

Returns

[DataMaintenanceEntry]

Example

query GetDataMaintenanceEntries {
  getDataMaintenanceEntries {
    createdTime
    updatedTime
    id
    accountUuid
    resourceUuid
    database
    dataset
    fullTableId
    monitorId
    timeSeriesUuid
    maintenanceType
    startTime
    endTime
    reason
    reasonType
  }
}

Related types

DataMaintenanceEntry, UUID

getDataMaintenanceEntriesByMcon (query)

getDataMaintenanceEntriesByMcon 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

Fetch exclusion windows for the given MCON

Arguments

ArgumentTypeDescription
mconString!MCON
startTimeDateTimeStart time of maintenance period
endTimeDateTimeEnd time of maintenance period
metricTypeDataMaintenanceMetricType of maintenance metric

Returns

[DataMaintenanceEntry]

Example

query GetDataMaintenanceEntriesByMcon($mcon: String!) {
  getDataMaintenanceEntriesByMcon(mcon: $mcon) {
    createdTime
    updatedTime
    id
    accountUuid
    resourceUuid
    database
    dataset
    fullTableId
    monitorId
    timeSeriesUuid
    maintenanceType
    startTime
    endTime
    reason
    reasonType
  }
}

Related types

DataMaintenanceEntry, DataMaintenanceMetric, DateTime

getDataMaintenanceEntriesByMonitor (query)

getDataMaintenanceEntriesByMonitor 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

Fetch exclusion windows for the given monitor

Arguments

ArgumentTypeDescription
monitorIdUUID!Monitor UUID
timeSeriesUuidUUIDOnly return windows for a specific time series UUID
startTimeDateTimeStart time of maintenance period
endTimeDateTimeEnd time of maintenance period
metricStringMetric to set maintenance period for. Deprecated: Use time_series_uuid instead
fieldStringField to set maintenance period for. Deprecated: Use time_series_uuid instead
whereConditionStringWhere condition to set maintenance period for. Deprecated: Use time_series_uuid instead
includeParentRuleWindowsBooleanIf true and the monitor is a rule generated from a parent rule (e.g. a SQL rule variation), windows defined on the parent rule are included as well. Use the monitorId on each entry to tell them apart.

Returns

[DataMaintenanceEntry]

Example

query GetDataMaintenanceEntriesByMonitor($monitorId: UUID!) {
  getDataMaintenanceEntriesByMonitor(monitorId: $monitorId) {
    createdTime
    updatedTime
    id
    accountUuid
    resourceUuid
    database
    dataset
    fullTableId
    monitorId
    timeSeriesUuid
    maintenanceType
    startTime
    endTime
    reason
    reasonType
  }
}

Related types

DataMaintenanceEntry, DateTime, UUID

getDataMaintenanceHolidayCodes (query)

getDataMaintenanceHolidayCodes 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

Fetch list of supported countries and market codes for data maintenance

Returns

[HolidayCode]

Example

query GetDataMaintenanceHolidayCodes {
  getDataMaintenanceHolidayCodes {
    code
  }
}

Types used only by getDataMaintenanceHolidayCodes

HolidayCode

Object type.

FieldTypeDescription
codeString!Country or financial market code

getDataMaintenanceHolidayNames (query)

getDataMaintenanceHolidayNames 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

Fetch list of supported holiday names

Arguments

ArgumentTypeDescription
countryOrMarketCodeString!Country or market code

Returns

[HolidayName]

Example

query GetDataMaintenanceHolidayNames($countryOrMarketCode: String!) {
  getDataMaintenanceHolidayNames(countryOrMarketCode: $countryOrMarketCode) {
    name
    nextDate
    occurrence
  }
}

Types used only by getDataMaintenanceHolidayNames

HolidayName

Object type.

FieldTypeDescription
nameString!Holiday name
nextDateDateTime!Date
occurrenceStringTextual description of when the holiday occurs

Related types

DateTime

Mutations

createDataMaintenanceWindowFromHolidays (mutation)

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

Status: Experimental

Create a maintenance window based over a list of holidays

Arguments

ArgumentTypeDescription
countryOrMarketCodeString!Country or market code for which to create holiday maintenance windows
endDate!Date until to create maintenance windows for
holidays[String]!List of holiday names to create maintenance window for
maintenanceTypeDataMaintenanceMetricIf not set, all metrics for the object will be ignored
mconString!MCON unique identifier of object to set maintenance period for. MCON can be of type 'warehouse', 'project', 'dataset' or any table type. Setting any type other than a table type will set the maintenance window for all matching tables.
startDate!Date from when to create maintenance windows for
timezoneString!Timezone to create maintenance windows for

Returns

CreateDataMaintenanceWindowFromHolidays

Example

mutation CreateDataMaintenanceWindowFromHolidays($countryOrMarketCode: String!, $end: Date!, $holidays: [String]!, $mcon: String!, $start: Date!, $timezone: String!) {
  createDataMaintenanceWindowFromHolidays(countryOrMarketCode: $countryOrMarketCode, end: $end, holidays: $holidays, mcon: $mcon, start: $start, timezone: $timezone) {
    entries {
      createdTime
      updatedTime
      id
      accountUuid
      resourceUuid
      database
      dataset
      fullTableId
      monitorId
      timeSeriesUuid
      maintenanceType
      startTime
      endTime
      reason
      reasonType
    }
  }
}

Types used only by createDataMaintenanceWindowFromHolidays

CreateDataMaintenanceWindowFromHolidays

Object type. Create a data maintenance window for a set of holidays

FieldTypeDescription
entries[DataMaintenanceEntry]

Related types

DataMaintenanceEntry, DataMaintenanceMetric, Date

createOrUpdateDataMaintenanceEntry (mutation)

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

Creates or updates a data maintenance period

Arguments

ArgumentTypeDescription
datasetStringDeprecated: Name of dataset to to set maintenance period for. If dataset is given, project is required as-well. Use 'mcon' instead.
dwIdUUIDWarehouse UUID. Required if no monitor_id is given
endTimeDateTimeStart period of data maintenance. If not set, all future data will be ignored until updated
fieldStringField to set maintenance period for. If set, the maintenance windows will only apply to the given field. Used for Monitor related windows only. Deprecated: Use time_series_uuid instead
idIntID of existing data maintenance entry for updating
maintenanceTypeDataMaintenanceMetricIf not set, all metrics for the object will be ignored
mconStringMCON unique identifier of object to set maintenance period for. MCON can be of type 'warehouse', 'project', 'dataset' or any table type. Setting any type other than a table type will set the maintenance window for all matching tables.
metricStringMetric to set maintenance period for. If set, the maintenance windows will only apply to the given metric. Used for Monitor related windows only. Deprecated: Use time_series_uuid instead
monitorIdUUIDMonitor ID to set maintenance period for. If set, the maintenance windows will only apply to the given monitor.
projectStringDeprecated: Name of database or project to to set maintenance period for. Use 'mcon' instead.
reasonStringDescription of the reason for the maintenance window
reasonTypeDataMaintenanceReasonTypeReason type for the maintenance window
startTimeDateTimeStart period of data maintenance. If not set, all previous data will be ignored.
timeSeriesUuidUUIDTime series UUID to set maintenance period for. If set, the maintenance windows will only apply to the given time series. Used for Monitor related windows only.
whereConditionStringWhere condition to set maintenance period for. If set, the maintenance windows will only apply to the given where condition. Used for Monitor related windows only. Deprecated: Use time_series_uuid instead

Returns

CreateOrUpdateDataMaintenanceEntry

Example

mutation CreateOrUpdateDataMaintenanceEntry {
  createOrUpdateDataMaintenanceEntry {
    entry {
      createdTime
      updatedTime
      id
      accountUuid
      resourceUuid
      database
      dataset
      fullTableId
      monitorId
      timeSeriesUuid
      maintenanceType
      startTime
      endTime
      reason
      reasonType
    }
  }
}

Types used only by createOrUpdateDataMaintenanceEntry

CreateOrUpdateDataMaintenanceEntry

Object type. Creates or updates a data maintenance period

FieldTypeDescription
entryDataMaintenanceEntry

Related types

DataMaintenanceEntry, DataMaintenanceMetric, DataMaintenanceReasonType, DateTime, UUID

deleteDataMaintenanceEntry (mutation)

deleteDataMaintenanceEntry 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 data maintenance window

Arguments

ArgumentTypeDescription
idInt!ID of existing data maintenance entry for deleting

Returns

DeleteDataMaintenanceEntry

Example

mutation DeleteDataMaintenanceEntry($id: Int!) {
  deleteDataMaintenanceEntry(id: $id) {
    success
  }
}

Types used only by deleteDataMaintenanceEntry

DeleteDataMaintenanceEntry

Object type. Delete a data maintenance window

FieldTypeDescription
successBoolean

Source: The GraphQL API reference

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