Add datasource quality and schema gates

This commit is contained in:
2026-08-04 11:23:14 +02:00
parent a6d5c9839d
commit 075d2fc087
16 changed files with 1305 additions and 10 deletions
+39 -1
View File
@@ -87,6 +87,44 @@ export type DatasourceMaterialization = {
governance: DatasourceGovernance;
};
export type DatasourceValidationDiagnostic = {
severity: "error" | "warning";
code: string;
message: string;
rule_id?: string;
affected_rows?: number;
row_numbers?: number[];
row_numbers_truncated?: boolean;
details?: Record<string, unknown>;
};
export type DatasourceSchemaChange = {
code: string;
classification: "compatible" | "warning" | "breaking";
message: string;
field?: string;
before?: DatasourceField;
after?: DatasourceField;
};
export type DatasourceStageValidation = {
version?: number;
policy_version?: string;
policy_hash?: string;
valid?: boolean;
errors?: DatasourceValidationDiagnostic[];
warnings?: DatasourceValidationDiagnostic[];
quality?: {
rules_evaluated?: number;
rules_passed?: number;
rules_failed?: number;
};
schema_change?: {
classification?: "new" | "compatible" | "warning" | "breaking";
changes?: DatasourceSchemaChange[];
};
};
export type DatasourceStage = {
ref: string;
name: string;
@@ -100,7 +138,7 @@ export type DatasourceStage = {
schema: DatasourceField[];
row_count?: number | null;
byte_count?: number | null;
validation: Record<string, unknown>;
validation: DatasourceStageValidation;
created_at?: string | null;
promoted_at?: string | null;
promoted_materialization_ref?: string | null;