UniteLabs
Data

How to create and view workflow run output data

This guide shows you how to utilise workflow run outputs

ℹ️ This is one of many methods to work with lab data using UniteLabs' tooling.
   Feel free to explore the others as well!

UniteLabs run outputs

Workflow outputs are a powerful feature in UniteLabs that help you visualize, share, and understand the results of your runs. They offer rich, human-friendly representations of your data—perfect for reviewing, debugging, and communicating your results. Whether you’re generating reports, charts, progress indicators, or structured tables, outputs turn raw results into digestible insights. You can choose from a variety of output formats:

  • Tables – Great for structured records like spreadsheets or tabular data.
  • Markdown – Useful for rich text summaries, reports, and formatted notes.
  • Images – Visualize charts, plots, or uploaded graphics.
  • Progress Indicators – Track the state of a long-running process in real time.
  • Links – Share external resources, files, or dashboards directly.

Guide: How to Create and View Workflow Outputs

Here's how you can start using workflow outputs:

  1. Select an existing workflow, or create a new one. platform_workflows_navigation.png
  2. In the code editor for your workflow, define the output type you want to generate:

To get a table output extract, add the following:

from prefect import flow
from prefect.artifacts import create_table_artifact

@flow
async def create_table():
    highest_churn_possibility = [
        {"customer_id": "12345", "name": "John Smith", "churn_probability": 0.85},
        {"customer_id": "56789", "name": "Jane Jones", "churn_probability": 0.65}
    ]

    create_table_artifact(
        key="personalized-reachout",
        table=highest_churn_possibility,
        description="# Marvin, please reach out to these customers today!"
    )
from prefect import flow
from prefect.artifacts import create image artifact

@flow 
async def create_image():
  # Do something to create an image and upload to a url
  image_url = "https://images.prismic.io/unitelabs/aC5CHidWJ-7kSahs_HeroSection.png?auto=format%2Ccompress&rect=27%2C0%2C5706%2C3804&width=3840"
  create_image_artifact(image_url=image_url, description="A gif.", key="gif")
  return image_url
from prefect import flow
from prefect.artifacts import create_markdown_artifact

@flow 
async def markdown_flow():
  na_revenue = 500000
  markdown_report = f"""# Sales Report
  ## Summary
  In the past quarter, our company saw a significant increase in sales, with a total revenue of $1,000, 000.
  This represents a 20% increase over the same period last year.
  ...
  """
from prefect import flow
from prefect.artifacts import create_progress_artifact, update_progress_artifact
from time import sleep

def fetch_batch(i: int):
  # Simulate fetching a batch of data
  sleep (2)

@flow
async def fetch_in_batches ():
  progress_artifact_id = create_progress_artifact(
      progress = 0.0,
      description = "Indicates the progress of fetching data in batches.")
  
  for i in range(1, 11):
    fetch_batch (i)
    update_progress_artifact(artifact_id=progress_artifact_id, progress=i * 10)

YES! You made it to the last option. Congrats 🙌! In fact, this one is powerful, because you can also generate links to files or data base views with it!!

from prefect import flow
from prefect.artifacts import create_link_artifact

@flow
async def create_link():
  create_link_artifact(
        key="irregular-data",
        link="https://unitelabs.io",
        description="Unitelabs",
    )
  1. Navigate to the run outputs platform_workflows_run_output_navigation.pngplatform_workflows_run_output_navigation.png
  2. Review the generated outputs

    platform_workflows_run_output_table.png

    platform_workflows_run_output_image.png

    platform_workflows_run_output_md.png

    platform_workflows_run_output_progress.png

    YES! You made it to the last option. Congrats 🙌! In fact, this one is powerful, because you can also generate links to files or data base views with it!! platform_workflows_run_output_link.png


Copyright © 2025