# Managing Workflows

## Overview

Once a workflow is created, you have 6 different options to manage the workflow you have created.  You can do each of the following from the main Workflow screen:

<img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/sC1SavSHOn1vIr6W2AU9/image.png" alt="" data-size="line"> [Test](#test-a-workflow) - Run the transformation portion of your workflow on a [test data warehouse](https://help.daasity.com/technical-docs/warehouse/test-data-warehouse/test-data-warehouse-overview).

<img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/pPHD0DkQEgt10CPVXPJq/image.png" alt="" data-size="line"> [Run](#run-a-workflow) - Run the workflow on your production warehouse on-demand. You can choose to run the entire workflow or only specific parts.

<img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/q22ERLa8reyx2XlL7r29/image.png" alt="" data-size="line"> [Edit](#editing-a-workflow) - Make changes to the workflow and adjust the extractions, transformations, and / or schedules of the workflow.

<img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/bfI3YoQCT3itJJrSJG9e/image.png" alt="" data-size="line"> [Activate / Deactivate](#activating-deactivating-a-workflow) - Turn the schedule on or off without deleting the workflow.

<img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/P7DJtqoEMrsZqkCNc0o4/image.png" alt="" data-size="line"> [Delete](#deleting-a-workflow) - Remove the workflow permanently from the app.

<img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/2UZxdkBeKsqOfUpZsM5F/image.png" alt="" data-size="line"> [Show Timeline](#showing-the-last-execution-timeline) - Show a graph of the time it took to extract, load, and transform the data the last time the workflow ran. This will only appear if the workflow has run at least once.

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/5i3AapGFYqFTAVqipfgT/Screenshot%202023-07-14%20at%208.06.36%20PM.png" alt=""><figcaption></figcaption></figure>

## Test a workflow

Testing a workflow enables you to run the transformation portion of your workflow on the [Test Data Warehouse](https://help.daasity.com/technical-docs/warehouse/test-data-warehouse) that you have created.  This is good SQL code development practice as it will enable you to validate that the transformation code you have created generates the expected output before you put the transformation code into production

{% hint style="warning" %}
You will not be able to test a workflow unless a test data warehouse has been created
{% endhint %}

To test a workflow follow these steps:

1. Click Test Workflow
2. Select the Test Warehouse and Branch to run
3. Run the workflow
4. View Workflow Results

Click on the test workflow icon next to the workflow you want to test

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/Qmow8FsYb9yqodz8D27I/Screenshot%202023-07-14%20at%204.44.56%20PM.png" alt=""><figcaption></figcaption></figure>

This will take you to the test workflow page where you will be able to select the test warehouse you want to run the code on and the branch of code you want to run by selecting the appropriate value from the two dropdowns.

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/Z09b8263k3f9wVKdCxXy/test_workflow_selection.png" alt=""><figcaption></figcaption></figure>

Once the selection are made, click on the Run button to execute the workflow.  This will run the workflow and take you to the Workflow Execution Status screen where you can track the workflow running

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/Ocjf3wzbTqIt75KsQn0w/image.png" alt=""><figcaption></figcaption></figure>

The workflow will either complete or fail giving you detailed information on the failure reason

From the Test Workflow screen you will be able to see the results of prior workflow executions and drill into the workflow execution status screen to see details on that workflow test

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/TGeXcu8JY3bSjlnhus5n/test_workflow_results.png" alt=""><figcaption></figcaption></figure>

## Run a workflow

Running a workflow enables you to run on-demand the entire extract, load, transform and operationalize parts of your workflow or to run just certain specific portions

To run a workflow, follow these steps:

1. Click Run Workflow
2. Select the components you want to run

Click on the run workflow icon next to the workflow you want to run

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/ZQ0ei7JepaLTqf3QpqWT/Screenshot%202023-07-14%20at%204.46.52%20PM.png" alt=""><figcaption></figcaption></figure>

This will take you to the Workflows screen where you will select the Extractions, Transformations and Operations that you would like this one-time workflow execution to run

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/ffR0b9DsgEQAB13pYZDF/image.png" alt=""><figcaption></figcaption></figure>

Once you have selected the appropriate sections and clicked run the app will take you to the Workflow Execution Status page where you can monitor the status of this one-time execution

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/M2sCmb1OIKjtasNIZuND/image.png" alt=""><figcaption></figcaption></figure>

## Edit a workflow

Editing a workflow enables you to make changes to the workflow and adjust the extractions, transformations and / or schedules of the workflow

To edit a workflow just click on the edit workflow button next to the workflow you want to edit and make the changes similar to how you would in [Creating Workflows](https://help.daasity.com/technical-docs/workflows-and-scheduling/creating-workflows)

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/wkJcskC1HBu0te4FYl3X/Screenshot%202023-07-14%20at%205.07.17%20PM.png" alt=""><figcaption></figcaption></figure>

## Activate / deactivate a workflow

Activating / Deactivating a workflow enables you to turn the schedule on or off so that the workflow follows the schedule as defined in setup.

To activate a workflow click on the activate button next to the workflow you want to turn on:

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/Fy8YX4IxUaVDlWz0doI2/Screenshot%202023-07-14%20at%208.09.07%20PM.png" alt=""><figcaption></figcaption></figure>

Which will prompt you to confirm you want to activate the workflow:

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/kyhqPKso6aRmJUr4iahU/image.png" alt=""><figcaption></figcaption></figure>

You can deactivate a workflow by clicking on the deactivate button next to the active workflow you want to turn off:

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/JpZ1z9TxiPaYZl5hF5BF/Screenshot%202023-07-14%20at%208.11.21%20PM.png" alt=""><figcaption></figcaption></figure>

Which will prompt you to confirm you want to deactivate the workflow:

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/Yh9IDMMxe2RGPeysdPOO/image.png" alt=""><figcaption></figcaption></figure>

## Delete a workflow

Deleting a workflow will remove the workflow from the UI. &#x20;

{% hint style="danger" %}
Deleting a workflow is permanent.  The Daasity Support team cannot recover a workflow that has been deleted.
{% endhint %}

To delete a workflow click on the delete button next to the workflow you want to remove:

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/s7xOZLnR5kxgmxBO7vMK/Screenshot%202023-07-14%20at%208.14.50%20PM.png" alt=""><figcaption></figcaption></figure>

Which will prompt you to confirm you want to delete the workflow

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/bqqQx5huCCzP1SQKNAMU/image.png" alt=""><figcaption></figcaption></figure>

## Show the last execution timeline

Showing the timeline for the last execution will expand the window to show you a graph of the time it took to extract, load and transform the data the last time the workflow ran.  To view the graph click on the the show timeline button next to the workflow:

{% hint style="info" %}
This button will show only if the workflow has been run at least once.
{% endhint %}

<figure><img src="https://content.gitbook.com/content/amTMWiPne1v1V3L7mbuj/blobs/sV2nmL8AiLenPa0aqXtL/Screenshot%202023-07-14%20at%208.22.08%20PM.png" alt=""><figcaption></figcaption></figure>
