Add datasource quality and schema gates
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user