diff --git a/docs/dqx/docs/guide/data_contract_quality_rules_generation.mdx b/docs/dqx/docs/guide/data_contract_quality_rules_generation.mdx index 1fac02f0a..1578797d2 100644 --- a/docs/dqx/docs/guide/data_contract_quality_rules_generation.mdx +++ b/docs/dqx/docs/guide/data_contract_quality_rules_generation.mdx @@ -196,6 +196,7 @@ Predefined rules are automatically derived from schema field constraints defined properties: - name: order_id logicalType: string + physicalType: string required: true # → is_not_null unique: true # → is_unique logicalTypeOptions: @@ -203,9 +204,10 @@ Predefined rules are automatically derived from schema field constraints defined - name: customer_email logicalType: string + physicalType: string required: true # → is_not_null logicalTypeOptions: - pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$' # → regex_match + pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$' # → regex_match - name: order_total logicalType: number @@ -217,6 +219,7 @@ Predefined rules are automatically derived from schema field constraints defined - name: order_status logicalType: string + physicalType: string required: true # → is_not_null logicalTypeOptions: pattern: '^(pending|confirmed|shipped|delivered|cancelled)$' # → regex_match @@ -235,6 +238,7 @@ Predefined rules are automatically derived from schema field constraints defined ) # Generated rules will include: + # - has_valid_schema (dataset-level, derived from the contract schema) # - is_not_null for order_id, customer_email, order_total, order_status # - is_unique for order_id # - regex_match for order_id (pattern validation) @@ -313,11 +317,13 @@ Explicit rules are defined in the `quality` section of a property or schema usin properties: - name: transaction_id logicalType: string + physicalType: string required: true unique: true - name: account_id logicalType: string + physicalType: string required: true quality: # Property-level explicit check @@ -451,6 +457,7 @@ Text-based expectations are defined using `type: text` in the quality section: properties: - name: email logicalType: string + physicalType: string required: true quality: # Field-level text expectation @@ -462,6 +469,7 @@ Text-based expectations are defined using `type: text` in the quality section: - name: consent_date logicalType: date + physicalType: date required: true quality: # Another text expectation @@ -529,9 +537,12 @@ Here's a complete example showing contract-based rule generation with all three id: urn:datacontract:iot:sensor_readings name: IoT Sensor Readings version: 2.1.0 - description: Quality contract for IoT sensor data status: active - owner: IoT Platform Team + description: + purpose: Quality contract for IoT sensor data + team: + - username: iot-platform-team + role: owner schema: - name: sensor_readings @@ -565,6 +576,7 @@ Here's a complete example showing contract-based rule generation with all three properties: - name: sensor_id logicalType: string + physicalType: string required: true # Predefined: is_not_null unique: true # Predefined: is_unique logicalTypeOptions: @@ -572,6 +584,7 @@ Here's a complete example showing contract-based rule generation with all three - name: temperature logicalType: decimal + physicalType: decimal(5,2) required: true # Predefined: is_not_null logicalTypeOptions: minimum: -40.0 # Predefined: sql_expression (range check) @@ -585,12 +598,10 @@ Here's a complete example showing contract-based rule generation with all three - name: status logicalType: string + physicalType: string required: true # Predefined: is_not_null logicalTypeOptions: - enum: # Predefined: regex_match - - active - - maintenance - - offline + pattern: '^(active|maintenance|offline)$' # Predefined: regex_match ``` @@ -766,23 +777,28 @@ id: urn:datacontract:marketing:customer_360 name: Customer 360 View version: 1.2.0 status: active -owner: Marketing Analytics Team - +team: + - username: marketing-analytics-team + role: owner + schema: - name: customer_360 physicalType: table properties: - name: customer_id logicalType: string + physicalType: string required: true unique: true - name: email logicalType: string + physicalType: string required: true logicalTypeOptions: pattern: '^[a-zA-Z0-9._%+-]+@.+$' - name: lifetime_value logicalType: decimal + physicalType: decimal(18,2) logicalTypeOptions: minimum: 0 """ @@ -813,9 +829,11 @@ schema: properties: - name: email logicalType: string + physicalType: string required: true - name: consent_date logicalType: date + physicalType: date required: true quality: - type: text