How do I configure a Mesa source factory?

Prev Next

Important

This feature is in Early Access and is subject to change.

A source factory gives you and your organisation a ready-made data source in Mesa that you can pull into any widget.

You choose a source type and specify which parameters everyone should share, and which ones each user can set. Other users can then pick your configured source factory from a list and get the right data set, without needing to configure it themselves.

Prerequisites

Before getting started, ensure you have:

  • Familiarised yourself with source types, sources, workspaces, and dashboards; see Understanding Mesa architecture.

  • A workspace to save your source factory in; this can be a different workspace from the one your dashboards are in.

  • Access to the LUSID data your source factory retrieves. Note that users of your source factory only need access to the workspace you save it in.

Step 1: Choose a source type

  1. Navigate to the Mesa UI.

  2. Select Source factories from the left-hand menu.

  3. Click Add factory and select the source type for your source factory, for example orders, portfolios, or transactions. By default, your source factory includes all the base columns for your selected source type.

Step 2: Specify a save location

Choose where Mesa saves your source factory using the following fields:

  • Workspace: Users need access to this workspace to use your source factory; read more on workspaces.

  • Group: Combines with Name to uniquely identify the source factory within the workspace.

  • Name: A friendly name for users to identify when they choose a source for their widgets.

  • Description: An optional description for the source factory.

Step 3: Configure execution settings

Specify whether your source factory should be available to users, and how Mesa retrieves its data.

  • Enabled: Toggle on to make the source factory available to users on creation.

  • Preload: Toggle on to fetch data in advance, so Mesa displays the data as soon as a user opens a dashboard, without waiting for it to load.

    Note

    We recommend you enable Preload for source factories whose data takes time to load. Preloaded data follows a 60-second refresh cycle; once a data refresh finishes, Mesa waits 60 seconds then begins the next refresh.

  • Run as: Choose whether to fetch the data as the current user or as a service user; read more on running as a service user.

Step 4: Specify your parameters

  1. Specify values for your source type’s required parameters. You can select Preview to inspect the data available in the source type.

  2. If the source type supports it, you can add additional parameters, such as properties and address keys. For each additional parameter, you must specify the following:

    • Property key: The 3-stage property key or queryable key

    • Id: A unique identifier for the parameter within the source factory

    • Name: A friendly display name for the parameter

    • Description: An optional description of the parameter

    Note

    You can click Edit parameters JSON to supply parameters as a JSON block instead of entering each parameter manually.

  3. Click the padlock icon and set each parameter as either:

    • Locked: Every widget that uses this source factory inherits the value you set now and cannot change it. We recommend locking values that every user should share, such as a scope or recipe.

    • Editable: Users can set the value themselves when they use this source factory. Leave values editable when they vary between dashboards, for example an effective range.

  4. Click Create to save the source factory.

If you toggled Enabled on, Mesa makes your source factory available to anyone with access to the workspace.

Step 5: Check your source factory works as expected

Once saved, add your source factory as a source on a dashboard to confirm it works.

Check that only your editable parameters ask for a value:


Troubleshooting

A source built from my source factory shows an error

Go to Manage sources and open the source preview. You can click on the logs to see what went wrong. Some common causes include:

  • An additional parameter specified in the source factory, such as a property, does not exist. This could be due to a typo, or because the property was deleted; correct the value in your source factory, or update your properties, and try again.

  • A locked parameter value doesn’t exist in LUSID; correct the value in your source factory and try again.

I can’t see the logs for preloaded data

To check a preloaded source factory, add the source factory as a source on a dashboard and view the logs in the source preview.