Dataflow_Action

a class based approach to interacting with dataflows
auth = dmda.DomoTokenAuth(
    domo_instance=os.environ['DOMO_DOJO_INSTANCE'],
    domo_access_token=os.environ["DOMO_DOJO_ACCESS_TOKEN"],
)

dataflows = (await dataflow_routes.get_dataflows(auth = auth)).response
dataflow_id = dataflows[0]['id']
warning this token has not been validated by who_am_i, run get_auth_token first

source

DomoDataflow_Action

 DomoDataflow_Action (id:str, type:str=None, name:str=None,
                      datasource_id:str=None, sql:str=None,
                      depends_on:List[str]=None,
                      parent_actions:List[dict]=None)

source

DomoAction

 DomoAction (id:str, type:str=None, name:str=None)

source

DomoDataflow_Action_Type

 DomoDataflow_Action_Type (value, names=None, module=None, qualname=None,
                           type=None, start=1)

An enumeration.

sample implementation of DataFlow_Action

Note: this list of properties that can be attached to DomoDataflow_Action is by no means comprehensive. To capture more data from the API, simply add properties to the class and extend the DomoDataflow_Action._from_json private method.

res = await dataflow_routes.get_dataflow_by_id(dataflow_id=dataflow_id, auth=auth)
actions_ls = res.response.get("actions")

[DomoDataflow_Action._from_json(action) for action in actions_ls][0:5]
[DomoDataflow_Action(id='6d9d3106-a084-481d-a69d-74840f17d018', type='LoadFromVault', name='@Zel Dojo', datasource_id='864c1409-461e-46fc-b4b3-0ed644903782', sql=None, depends_on=None, parent_actions=None),
 DomoDataflow_Action(id='49f0cb44-56bb-4e19-ae8b-b83be193e3c6', type='Filter', name='LostConnectivity and Disregard', datasource_id=None, sql=None, depends_on=['6d9d3106-a084-481d-a69d-74840f17d018'], parent_actions=None),
 DomoDataflow_Action(id='b8d8da16-2db0-4d88-9287-b349901d7d54', type='GroupBy', name='Group By', datasource_id=None, sql=None, depends_on=['49f0cb44-56bb-4e19-ae8b-b83be193e3c6'], parent_actions=None),
 DomoDataflow_Action(id='2c3aa4bb-07f5-45f4-abfa-26e9747f1fa5', type='Constant', name='Add Constants', datasource_id=None, sql=None, depends_on=['b8d8da16-2db0-4d88-9287-b349901d7d54'], parent_actions=None),
 DomoDataflow_Action(id='e9e76a06-7a82-429a-bb3f-f1e912e1d6bc', type='MergeJoin', name='Join Data', datasource_id=None, sql=None, depends_on=['6d9d3106-a084-481d-a69d-74840f17d018', '2c3aa4bb-07f5-45f4-abfa-26e9747f1fa5'], parent_actions=None)]

source

DomoDataflow_ActionResult

 DomoDataflow_ActionResult (id:str, type:str=None, name:str=None,
                            is_success:bool=None, rows_processed:int=None,
                            begin_time:datetime.datetime=None,
                            end_time:datetime.datetime=None,
                            duration_in_sec:int=None)
executions = (
    await dataflow_routes.get_dataflow_execution_history(
        auth=auth, dataflow_id=dataflow_id
    )
).response

executions

res = await dataflow_routes.get_dataflow_execution_by_id(
    dataflow_id=dataflow_id, 
execution_id=executions[0]['id'], 
auth=auth
)

res

action_ls = res.response.get("actionResults", [])

[DomoDataflow_ActionResult._from_json(action_obj) for action_obj in action_ls]
[DomoDataflow_ActionResult(id='6d9d3106-a084-481d-a69d-74840f17d018', type='DataHubManifestLoaderAction', name=None, is_success=True, rows_processed=0, begin_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 189000), end_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 189000), duration_in_sec=0.0),
 DomoDataflow_ActionResult(id='49f0cb44-56bb-4e19-ae8b-b83be193e3c6', type='Filter', name=None, is_success=True, rows_processed=0, begin_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 189000), end_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 189000), duration_in_sec=0.0),
 DomoDataflow_ActionResult(id='b8d8da16-2db0-4d88-9287-b349901d7d54', type='GroupBy', name=None, is_success=True, rows_processed=0, begin_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 434000), end_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 435000), duration_in_sec=0.001),
 DomoDataflow_ActionResult(id='2c3aa4bb-07f5-45f4-abfa-26e9747f1fa5', type='Constant', name=None, is_success=True, rows_processed=0, begin_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 434000), end_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 434000), duration_in_sec=0.0),
 DomoDataflow_ActionResult(id='e9e76a06-7a82-429a-bb3f-f1e912e1d6bc', type='MergeJoin', name=None, is_success=True, rows_processed=0, begin_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 421000), end_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 509000), duration_in_sec=0.088),
 DomoDataflow_ActionResult(id='9a80fd0d-33fb-4085-a20a-3ab856f5a762', type='ExpressionEvaluator', name=None, is_success=True, rows_processed=0, begin_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 509000), end_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 509000), duration_in_sec=0.0),
 DomoDataflow_ActionResult(id='f32d6203-2ab9-42b0-b44b-f0ee823202f3', type='PublishToVault', name=None, is_success=True, rows_processed=0, begin_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 641000), end_time=datetime.datetime(2024, 8, 27, 21, 23, 56, 642000), duration_in_sec=0.001)]