Skip to content

dataflow

dataflow

Dataflow route module - re-exports all dataflow functionality.

execute_dataflow async

execute_dataflow(
    auth: DomoAuth,
    dataflow_id: int,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • POST /dataprocessing/v1/dataflows/{}/executions

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
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
287
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def execute_dataflow(
    auth: DomoAuth,
    dataflow_id: int,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}/executions"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="POST",
        context=context,
    )

    if not res.is_success:
        raise CRUD_Dataflow_Error(res)

    return res

generate_search_dataflows_to_jupyter_workspaces_body

generate_search_dataflows_to_jupyter_workspaces_body(
    filter_body: dict | None = None,
    dataflow_id: int | None = None,
) -> dict

Ensure the DATA_FLOW_ID filter exists in filter_body and append the given dataflow_id to it (only if it's not already present).

Parameters:

Name Type Description Default
filter_body dict

e.g. {"filters":[{"type":"DATA_FLOW_ID","values":[116]}]}

None
dataflow_id int

ID to add under the DATA_FLOW_ID filter

None
Source code in src/crew_dcs/routes/dataflow/jupyter.py
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
def generate_search_dataflows_to_jupyter_workspaces_body(
    filter_body: dict | None = None, dataflow_id: int | None = None
) -> dict:
    """
    Ensure the DATA_FLOW_ID filter exists in filter_body and append the given dataflow_id to it
    (only if it's not already present).

    Args:
        filter_body (dict): e.g. {"filters":[{"type":"DATA_FLOW_ID","values":[116]}]}
        dataflow_id (int): ID to add under the DATA_FLOW_ID filter
    """

    filter_body = filter_body or {}

    if not dataflow_id:
        return filter_body

    # 1. Make sure there's a filters list
    filters = filter_body.setdefault("filters", [])

    # 2. Try to find an existing DATA_FLOW_ID filter
    for f in filters:
        if f.get("type") == "DATA_FLOW_ID":
            # append if it's new
            if dataflow_id not in f["values"]:
                f["values"].append(dataflow_id)
            break
    else:
        # 3. If we never broke out, no filter existed—create it
        filters.append({"type": "DATA_FLOW_ID", "values": [dataflow_id]})

    return filter_body

get_dataflow_by_id async

get_dataflow_by_id(
    dataflow_id: int,
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • GET /dataprocessing/v1/dataflows/{}

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
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
90
91
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_dataflow_by_id(
    dataflow_id: int,
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    domo_instance = auth.domo_instance

    url = f"https://{domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise GET_Dataflow_Error(res)

    return res

get_dataflow_by_id_and_version async

get_dataflow_by_id_and_version(
    dataflow_id: int,
    version_id: int,
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • GET /dataprocessing/v2/dataflows/{}/versions/{}

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_dataflow_by_id_and_version(
    dataflow_id: int,
    version_id: int,
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v2/dataflows/{dataflow_id}/versions/{version_id}"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise GET_Dataflow_Error(res)

    return res

get_dataflow_execution_by_id async

get_dataflow_execution_by_id(
    auth: DomoAuth,
    dataflow_id: int,
    execution_id: int,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • GET /dataprocessing/v1/dataflows/{}/executions/{}

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_dataflow_execution_by_id(
    auth: DomoAuth,
    dataflow_id: int,
    execution_id: int,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}/executions/{execution_id}"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise GET_Dataflow_Error(res)

    return res

get_dataflow_execution_history async

get_dataflow_execution_history(
    dataflow_id: int,
    auth: DomoAuth,
    maximum: int | None = None,
    debug_loop: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • GET /dataprocessing/v1/dataflows/{}/executions

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
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
219
220
221
222
223
224
225
226
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_dataflow_execution_history(
    dataflow_id: int,
    auth: DomoAuth,
    maximum: int | None = None,
    debug_loop: bool = False,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}/executions"

    def arr_fn(res):
        return res.response

    res = await gd.looper(
        auth=auth,
        url=url,
        loop_until_end=bool(not maximum),
        method="GET",
        offset_params_in_body=False,
        offset_params={"offset": "offset", "limit": "limit"},
        arr_fn=arr_fn,
        maximum=maximum,
        limit=100,
        debug_loop=debug_loop,
        context=context,
    )

    if not res.is_success:
        raise GET_Dataflow_Error(res)

    return res

get_dataflow_tags_by_id async

get_dataflow_tags_by_id(
    auth: DomoAuth,
    dataflow_id: int,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • GET /dataprocessing/v1/dataflows/{}/tags
Source code in src/crew_dcs/routes/dataflow/tags.py
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_dataflow_tags_by_id(
    auth: DomoAuth,
    dataflow_id: int,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}/tags"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise GET_Dataflow_Error(res=res)

    return res

get_dataflow_versions async

get_dataflow_versions(
    dataflow_id: int,
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • GET /dataprocessing/v1/dataflows/{}/versions

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
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
151
152
153
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_dataflow_versions(
    dataflow_id: int,
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}/versions"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise GET_Dataflow_Error(res=res)

    return res

get_dataflows async

get_dataflows(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • GET /dataprocessing/v1/dataflows

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_dataflows(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    domo_instance = auth.domo_instance

    url = f"https://{domo_instance}.domo.com/api/dataprocessing/v1/dataflows"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise GET_Dataflow_Error(res)

    return res

get_magic_etl_tile_documentation async

get_magic_etl_tile_documentation(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Retrieve tile/function documentation for Magic ETL from the Domo API (v2 preferred).

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object

required
context RouteContext | None

RouteContext for request configuration

None
**context_kwargs

Additional context parameters (session, debug_api, etc.)

{}

Returns:

Type Description
ResponseGetData

ResponseGetData containing the Magic ETL tile documentation

Raises:

Type Description
MagicETLTileDocumentation_GET_Error

If the request fails

Endpoint

  • GET /dataprocessing/v2/expression-docs

Called by

Source code in src/crew_dcs/routes/dataflow/magic_etl_tile_documentation.py
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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_magic_etl_tile_documentation(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Retrieve tile/function documentation for Magic ETL from the Domo API (v2 preferred).

    Args:
        auth: Authentication object
        context: RouteContext for request configuration
        **context_kwargs: Additional context parameters (session, debug_api, etc.)

    Returns:
        ResponseGetData containing the Magic ETL tile documentation

    Raises:
        MagicETLTileDocumentation_GET_Error: If the request fails
    """
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v2/expression-docs"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise MagicETLTileDocumentation_GET_Error(res=res)

    return res

get_magic_etl_tile_documentation_v1 async

get_magic_etl_tile_documentation_v1(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Retrieve tile/function documentation for Magic ETL from the Domo API (v1 fallback).

Parameters:

Name Type Description Default
auth DomoAuth

Authentication object

required
context RouteContext | None

RouteContext for request configuration

None
**context_kwargs

Additional context parameters (session, debug_api, etc.)

{}

Returns:

Type Description
ResponseGetData

ResponseGetData containing the Magic ETL tile documentation

Raises:

Type Description
MagicETLTileDocumentation_GET_Error

If the request fails

Endpoint

  • GET /dataprocessing/v1/expression-docs

Called by

Source code in src/crew_dcs/routes/dataflow/magic_etl_tile_documentation.py
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def get_magic_etl_tile_documentation_v1(
    auth: DomoAuth,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    """Retrieve tile/function documentation for Magic ETL from the Domo API (v1 fallback).

    Args:
        auth: Authentication object
        context: RouteContext for request configuration
        **context_kwargs: Additional context parameters (session, debug_api, etc.)

    Returns:
        ResponseGetData containing the Magic ETL tile documentation

    Raises:
        MagicETLTileDocumentation_GET_Error: If the request fails
    """
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/expression-docs"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="GET",
        context=context,
    )

    if not res.is_success:
        raise MagicETLTileDocumentation_GET_Error(res=res)

    return res

put_dataflow_tags_by_id async

put_dataflow_tags_by_id(
    auth: DomoAuth,
    dataflow_id: int,
    tag_ls: list[str],
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • PUT /dataprocessing/v1/dataflows/{}/tags

Called by

Source code in src/crew_dcs/routes/dataflow/tags.py
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
90
91
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def put_dataflow_tags_by_id(
    auth: DomoAuth,
    dataflow_id: int,
    tag_ls: list[str],
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}/tags"

    body = generate_tag_body(dataflow_id=dataflow_id, tag_ls=tag_ls)

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="PUT",
        body=body,
        context=context,
    )

    if not res.is_success:
        raise CRUD_Dataflow_Error(res=res)

    return res

search_dataflows_to_jupyter_workspaces async

search_dataflows_to_jupyter_workspaces(
    auth: DomoAuth,
    dataflow_id: int | None = None,
    return_raw: bool = False,
    filter_body: dict | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • POST /datascience/v1/search/notebooks

Called by

Source code in src/crew_dcs/routes/dataflow/jupyter.py
 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
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def search_dataflows_to_jupyter_workspaces(
    auth: DomoAuth,
    dataflow_id: int | None = None,
    return_raw: bool = False,
    filter_body: dict | None = None,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    filter_body = generate_search_dataflows_to_jupyter_workspaces_body(
        filter_body=filter_body, dataflow_id=dataflow_id
    )

    res = await gd.get_data(
        url=f"https://{auth.domo_instance}.domo.com/api/datascience/v1/search/notebooks",
        auth=auth,
        method="POST",
        body=filter_body,
        context=context,
    )

    if return_raw:
        return res

    if not res.is_success:
        raise RouteError(res=res)

    res.response = res.response["notebooks"]

    if dataflow_id:
        if not res.response:
            raise RouteError(
                res=res,
                entity_id=dataflow_id,
                message="unable to retrieve jupyter notebook data for dataflow",
            )

        res.response = res.response[-1]

    return res

update_dataflow_definition async

update_dataflow_definition(
    auth: DomoAuth,
    dataflow_id: int,
    dataflow_definition: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> ResponseGetData

Endpoint

  • PUT /dataprocessing/v1/dataflows/{}

Called by

Source code in src/crew_dcs/routes/dataflow/core.py
 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
@gd.route_function
@log_call(
    level_name="route",
    config=LogDecoratorConfig(
        entity_extractor=DomoEntityExtractor(),
        result_processor=DomoEntityResultProcessor(),
    ),
)
async def update_dataflow_definition(
    auth: DomoAuth,
    dataflow_id: int,
    dataflow_definition: dict,
    *,
    context: RouteContext | None = None,
    **context_kwargs,
) -> rgd.ResponseGetData:
    url = f"https://{auth.domo_instance}.domo.com/api/dataprocessing/v1/dataflows/{dataflow_id}"

    res = await gd.get_data(
        auth=auth,
        url=url,
        method="PUT",
        body=dataflow_definition,
        context=context,
    )

    if not res.is_success:
        raise CRUD_Dataflow_Error(res=res)

    return res

Modules