You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cube_http/types/v1/meta.py
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,9 @@ class V1CubeMetaJoin(BaseModel):
23
23
description="The type of relationship between the cubes. Valid relationships are `one_to_one`, `one_to_many`, and `many_to_one`."
24
24
)
25
25
26
-
sql: str=Field(
27
-
description="The SQL ON clause that specifies the join condition between the cubes. It is important to accurately define the matching columns to ensure correct join behavior."
26
+
sql: Optional[str] =Field(
27
+
default=None,
28
+
description="The SQL ON clause that specifies the join condition between the cubes. It is important to accurately define the matching columns to ensure correct join behavior.",
28
29
)
29
30
30
31
@@ -34,8 +35,8 @@ class V1CubeMetaSegment(BaseModel):
34
35
description="The unique identifier for the segment. It must be unique among all segments, dimensions, and measures within a cube and follow naming conventions.",
35
36
)
36
37
37
-
sql: str=Field(
38
-
default="",
38
+
sql: Optional[str]=Field(
39
+
default=None,
39
40
description="A required parameter that defines the SQL expression used to filter the data for this segment. The SQL should be valid within a WHERE clause and can implement complex filtering logic.",
40
41
)
41
42
@@ -80,8 +81,8 @@ class V1CubeMetaDimension(BaseModel):
80
81
description="A description providing more context about what the dimension represents. This is useful for ensuring that users understand the attribute correctly.",
81
82
)
82
83
83
-
sql: str=Field(
84
-
default="",
84
+
sql: Optional[str]=Field(
85
+
default=None,
85
86
description="A required parameter that defines the SQL expression used to derive the dimension's value. The SQL should return a value consistent with the dimension's type.",
86
87
)
87
88
@@ -149,8 +150,8 @@ class V1CubeMetaMeasure(BaseModel):
149
150
description="A description providing more context about what the measure represents. This is useful for ensuring that users understand the metric correctly.",
150
151
)
151
152
152
-
sql: str=Field(
153
-
default="",
153
+
sql: Optional[str]=Field(
154
+
default=None,
154
155
description="A required parameter that defines the SQL expression used to calculate the measure. Depending on the measure type, this can be an aggregation, a simple SQL expression, or even a calculation involving other measures.",
0 commit comments