Creating and running workflows

As you work with your database, you might want to run repeatable tasks such as:

  • Generating additional data

  • Posting data to another location

  • Generating unstructured files from the data

  • Starting tests

  • Validating data

Instead of issuing a separate prompt every time, you can have the agent create a repeatable workflow. The workflow runs the exact same way every time.

Configuring required connections for the workflow

A workflow might need to connect to external domains in order to complete its tasks.

To enable these connections:

Creating a workflow

To create a workflow, you issue a prompt that tells the Data Agent to create a workflow and explain what the workflow accomplishes. The workflow prompt can include parameters that you provide whenever you run the workflow.

For example:

Create a workflow that adds records to the customers table and then adds an order for each of those new customers to the orders table. Prompt for the number of customers to add.

If the workflow requires a connection to an external domain, then you can include the required credentials in the prompt. The domain and secret must already be configured in your account and workspace.

For example, you can provide the name of a configured secret to use.

Create a workflow that pushes the data to the API. Use the secret my_secret_name.

Or you can make the secret a parameter that you provide when you run the workflow.

Create a workflow that pushes the data to the API. Prompt for the secret to use for the connection.

The Data Agent adds the workflow to the Workflows list in the left panel.

Workflows list for a Data Agent database

Running a workflow

To run a workflow, you can issue a prompt to run the workflow. For example:

Run the Add Customers with Orders workflow to add 10 more customers.

Alternatively:

  1. In the Workflows list, click the workflow name. The workflow details display the required parameters for the workflow.

Workflow details for a Data Agent workflow
  1. After you fill in the parameter fields, click Run Workflow.

Viewing the workflow script

To create the workflow, Fabricate generates a script.

To view the script:

  1. In the Workflows list, click the workflow name.

  2. On the workflow details, click the script view icon.

Script view for a Data Agent workflow

Updating a workflow

You can use the Data Agent to make corrections to the workflow.

For example, to update the workflow that adds customers so that it also return the number of customers that were added:

Update the Add Customers with Orders workflow to also return the number of records that were added.

Deleting a workflow

To delete a workflow:

  1. In the Workflows list, click the workflow name.

  2. On the workflow details, click the delete icon.

Last updated

Was this helpful?