dataset_views
dataset_views ¶
create_semantic_model
async
¶
create_semantic_model(
auth: DomoAuth,
data_source_name: str,
schema: dict,
*,
data_source_description: str | None = None,
cloud_id: str = "domo",
body: dict | None = None,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Create a new data model (POST /api/query/v1/semantic-models).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
data_source_name
|
str
|
Model display name |
required |
schema
|
dict
|
The model definition: |
required |
data_source_description
|
str | None
|
Optional model description |
None
|
cloud_id
|
str
|
Cloud engine ID (defaults to "domo") |
'domo'
|
body
|
dict | None
|
Fully pre-built payload; overrides the generated envelope |
None
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData containing the new model's |
Note
The Domo API has a validation bug where non-primary relationships
require a non-null alias field but rejects all string values for it.
The workaround is to set primary=True for all relationships in the
schema. The DataModelTemplate.to_schema() method preserves whatever
primary values are set on the relationships.
Source code in src/crew_dcs/routes/dataset/dataset_views.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | |
get_dataset_view_schema_indexed
async
¶
get_dataset_view_schema_indexed(
auth: DomoAuth,
dataset_id: str,
include_data_control_column_details: bool = True,
flatten: bool | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Get the indexed schema for a dataset view with optional data control column details.
This endpoint returns the schema structure for a dataset view, including: - Column definitions with types and visibility - SELECT query structure - View template information - Data control column details (if requested)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
dataset_id
|
str
|
The dataset view ID |
required |
include_data_control_column_details
|
bool
|
If True, includes data control column details |
True
|
flatten
|
bool | None
|
If False, preserves per-table join structure (required to get a
data model's |
None
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters (session, debug_api, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseGetData
|
ResponseGetData object containing: |
ResponseGetData
|
|
ResponseGetData
|
|
ResponseGetData
|
|
ResponseGetData
|
|
ResponseGetData
|
|
ResponseGetData
|
|
ResponseGetData
|
|
Raises:
| Type | Description |
|---|---|
Dataset_GET_Error
|
If schema retrieval fails |
Source code in src/crew_dcs/routes/dataset/dataset_views.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
update_semantic_model
async
¶
update_semantic_model(
auth: DomoAuth,
model_id: str,
schema: dict,
*,
data_source_name: str | None = None,
data_source_description: str | None = None,
last_updated: str | None = None,
cloud_id: str = "domo",
can_edit: bool = True,
body: dict | None = None,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Update a data model (PUT /api/query/v1/semantic-models/{model_id}).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
model_id
|
str
|
The data model (semantic model) datasource ID |
required |
schema
|
dict
|
The model definition: |
required |
data_source_name
|
str | None
|
Model display name |
None
|
data_source_description
|
str | None
|
Model description |
None
|
last_updated
|
str | None
|
ISO-8601 last-updated timestamp echoed back to the API |
None
|
cloud_id
|
str
|
Cloud engine ID (defaults to "domo") |
'domo'
|
can_edit
|
bool
|
Whether the caller can edit (defaults to True) |
True
|
body
|
dict | None
|
Fully pre-built payload; overrides the generated envelope |
None
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Source code in src/crew_dcs/routes/dataset/dataset_views.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
update_view
async
¶
update_view(
auth: DomoAuth,
view_id: str,
schema: dict,
*,
data_source_name: str | None = None,
trigger: dict | None = None,
data_provider_type: str | None = None,
body: dict | None = None,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Update a dataset view's definition (PUT /api/query/v1/views/{view_id}).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auth
|
DomoAuth
|
Authentication object |
required |
view_id
|
str
|
The dataset view ID |
required |
schema
|
dict
|
The view schema payload (tables + viewTemplate + tableAliases).
Typically a (possibly edited) |
required |
data_source_name
|
str | None
|
View display name |
None
|
trigger
|
dict | None
|
Refresh trigger config (defaults to |
None
|
data_provider_type
|
str | None
|
Data provider type (usually None for views) |
None
|
body
|
dict | None
|
Fully pre-built payload; overrides the generated envelope |
None
|
context
|
RouteContext | None
|
RouteContext for request configuration |
None
|
**context_kwargs
|
Additional context parameters |
{}
|
Source code in src/crew_dcs/routes/dataset/dataset_views.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |