Skip to content

Commit a0b2493

Browse files
committed
fix: dq rule condition builder
1 parent adec96e commit a0b2493

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

pyatlan/model/dq_rule_conditions.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,7 @@
1414

1515

1616
class DQCondition(AtlanObject):
17-
"""
18-
Data quality rule condition.
19-
20-
:param type: the condition type enum value
21-
:param value: value of type str, int, or list depending on condition type
22-
:param min_value: minimum value for range-based conditions
23-
:param max_value: maximum value for range-based conditions
24-
"""
17+
"""Data quality rule condition."""
2518

2619
type: alpha_dqRuleTemplateConfigRuleConditions = Field(description="")
2720
value: Optional[Union[str, int, List[str], Dict[str, Any]]] = Field(
@@ -78,13 +71,12 @@ def __init__(
7871
validate_type("value", str, self.value)
7972

8073
def to_dict(self) -> Dict[str, Any]:
81-
"""Convert the condition to a dictionary representation."""
8274
result: Dict[str, Any] = {"type": self.type.value}
8375

8476
if self.type == alpha_dqRuleTemplateConfigRuleConditions.STRING_LENGTH_BETWEEN:
8577
result["value"] = {"minValue": self.min_value, "maxValue": self.max_value}
8678
else:
87-
result["value"] = self.value
79+
result["value"] = {"value": self.value}
8880

8981
return result
9082

@@ -119,7 +111,6 @@ def add_condition(
119111
return self
120112

121113
def build(self) -> str:
122-
"""Build the conditions as a JSON string."""
123114
if not self._conditions:
124115
raise ErrorCode.INVALID_PARAMETER_VALUE.exception_with_parameters(
125116
"empty conditions list", "conditions", "at least one condition"

0 commit comments

Comments
 (0)