@@ -8997,6 +8997,61 @@ components:
89978997 type: string
89988998 x-enum-varnames:
89998999 - DATA_QUALITY_METRICS
9000+ MonitorFormulaAndFunctionDataQualityDiffFunction:
9001+ description: |-
9002+ Function applied to the measure before it is compared against the predicted bounds.
9003+ enum:
9004+ - DIFF
9005+ - DIFF_PERCENT
9006+ example: "DIFF"
9007+ type: string
9008+ x-enum-varnames:
9009+ - DIFF
9010+ - DIFF_PERCENT
9011+ MonitorFormulaAndFunctionDataQualityDiffType:
9012+ description: |-
9013+ How the difference between the source and target measures is computed.
9014+ `absolute` subtracts the two values, `diff_percent` expresses the difference
9015+ as a percentage of the source value.
9016+ enum:
9017+ - absolute
9018+ - diff_percent
9019+ example: "absolute"
9020+ type: string
9021+ x-enum-varnames:
9022+ - ABSOLUTE
9023+ - DIFF_PERCENT
9024+ MonitorFormulaAndFunctionDataQualityEntityMetricConfig:
9025+ description: |-
9026+ Measure configuration for one side of a source to target comparison.
9027+ properties:
9028+ custom_sql:
9029+ description: Custom SQL query used to compute the measure for this entity.
9030+ example: "SELECT COUNT(*) FROM users AS dd_value"
9031+ type: string
9032+ custom_where:
9033+ description: Custom WHERE clause applied when computing the measure for this entity.
9034+ example: "USER_ID = 123"
9035+ type: string
9036+ entity_id:
9037+ description: Identifier of the data entity to measure.
9038+ example: "01234567-89ab-cdef-0123-456789abcdef"
9039+ type: string
9040+ entity_type:
9041+ description: Type of the data entity to measure.
9042+ example: "table"
9043+ type: string
9044+ group_by_columns:
9045+ description: Columns to group results by when computing the measure for this entity.
9046+ example: ["col1", "col2"]
9047+ items:
9048+ description: A column name to group results by.
9049+ type: string
9050+ type: array
9051+ required:
9052+ - entity_id
9053+ - entity_type
9054+ type: object
90009055 MonitorFormulaAndFunctionDataQualityMeasure:
90019056 description: |-
90029057 The data quality measure to query. Common values include:
@@ -9005,6 +9060,58 @@ components:
90059060 `sum`, `uniqueness`. Additional values may be supported.
90069061 example: "row_count"
90079062 type: string
9063+ MonitorFormulaAndFunctionDataQualityModelBoundsOverride:
9064+ description: |-
9065+ Restricts which predicted bound the monitor alerts on. `UPPER_ONLY` alerts only when
9066+ the measure rises above the upper bound, `LOWER_ONLY` only when it falls below the
9067+ lower bound. When unset, the monitor alerts on both.
9068+ enum:
9069+ - UPPER_ONLY
9070+ - LOWER_ONLY
9071+ example: "UPPER_ONLY"
9072+ type: string
9073+ x-enum-varnames:
9074+ - UPPER_ONLY
9075+ - LOWER_ONLY
9076+ MonitorFormulaAndFunctionDataQualityModelConfiguration:
9077+ description: |-
9078+ Tuning options for the anomaly detection model used by the monitor.
9079+ properties:
9080+ auto_resolve_days:
9081+ description: |-
9082+ Number of days after which an open alert is automatically resolved.
9083+ When unset, alerts stay open until the measure returns within bounds.
9084+ example: 7
9085+ format: int32
9086+ maximum: 365
9087+ type: integer
9088+ enable_flatline_detection:
9089+ description: |-
9090+ Whether to alert when the measure stops changing entirely.
9091+ Defaults to `true`.
9092+ example: true
9093+ type: boolean
9094+ function:
9095+ $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualityDiffFunction"
9096+ min_lower_bound_size:
9097+ description: |-
9098+ Minimum distance between the predicted value and the lower bound. Widening the
9099+ lower bound to at least this size suppresses alerts on small downward deviations.
9100+ When unset, no minimum is enforced.
9101+ example: 10.0
9102+ format: double
9103+ type: number
9104+ min_upper_bound_size:
9105+ description: |-
9106+ Minimum distance between the predicted value and the upper bound. Widening the
9107+ upper bound to at least this size suppresses alerts on small upward deviations.
9108+ When unset, no minimum is enforced.
9109+ example: 10.0
9110+ format: double
9111+ type: number
9112+ model_bounds_override:
9113+ $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualityModelBoundsOverride"
9114+ type: object
90089115 MonitorFormulaAndFunctionDataQualityModelTypeOverride:
90099116 description: Override for the model type used in anomaly detection.
90109117 enum:
@@ -9038,6 +9145,8 @@ components:
90389145 description: A column name to group results by.
90399146 type: string
90409147 type: array
9148+ model_configuration:
9149+ $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualityModelConfiguration"
90419150 model_type_override:
90429151 $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualityModelTypeOverride"
90439152 sensitivity:
@@ -9048,6 +9157,8 @@ components:
90489157 example: 3.0
90499158 format: double
90509159 type: number
9160+ source_to_target_config:
9161+ $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualitySourceToTargetConfig"
90519162 type: object
90529163 MonitorFormulaAndFunctionDataQualityQueryDefinition:
90539164 description: A formula and functions data quality query.
@@ -9090,6 +9201,27 @@ components:
90909201 - measure
90919202 - filter
90929203 type: object
9204+ MonitorFormulaAndFunctionDataQualitySourceToTargetConfig:
9205+ description: |-
9206+ Configuration for a source to target monitor, which compares the same measure
9207+ across two data entities and alerts on the difference between them.
9208+ properties:
9209+ diff_type:
9210+ $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualityDiffType"
9211+ entity_type:
9212+ description: Type of the data entities being compared.
9213+ example: "table"
9214+ type: string
9215+ source:
9216+ $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualityEntityMetricConfig"
9217+ target:
9218+ $ref: "#/components/schemas/MonitorFormulaAndFunctionDataQualityEntityMetricConfig"
9219+ required:
9220+ - source
9221+ - target
9222+ - diff_type
9223+ - entity_type
9224+ type: object
90939225 MonitorFormulaAndFunctionEventAggregation:
90949226 description: Aggregation methods for event platform queries.
90959227 enum:
0 commit comments