Use Datastores with Apps and Workflows

App Builder is not supported for your selected Datadog site ().

You can reference and perform CRUD (Create, Read, Update, and Delete) operations on a datastore inside a workflow or an app. Additionally, you can create a workflow or app directly from an existing datastore.

Create a workflow or app from a datastore

You can get started with a workflow or app directly from a datastore. Each time you create a datastore, Datadog asks you if you’d like to create a workflow or app, or view your datastore.

When you create a datastore, Datadog asks if you'd like to create a workflow or app.

Workflow Automation

To create a workflow from a datastore:

  1. On the Datastore page, locate your datastore in the list and click to open it.
  2. Click Create > Workflow from Datastore.

Datadog creates a workflow with a List items workflow step prepopulated with your datastore ID. From here, follow the Workflow Automation documentation to build your workflow. For a list of available datastore actions, see the Action Catalog.

App Builder

To create an app from a datastore:

  1. On the Datastore page, locate your datastore in the list and click to open it.
  2. Click Create > App from Datastore.

Datadog creates an app prepopulated with your datastore ID. From here, follow the App Builder documentation to build your app. For a list of available datastore actions, see the Action Catalog.

Use a datastore in an app

To use a datastore in an existing app, add a datastore action:

  1. Click the Data ({ }) icon to open the Data tab.

  2. Click the plus (+) icon, select Action, and add a Datastore action to add to your app. For a list of available datastore actions, see the Action Catalog.

  3. Choose an existing connection or create one.

  4. From the Datastore ID drop-down menu, select an existing datastore, or select New Datastore to create one.

    Add the datastore from an App Builder action

Use multiple datastores with a single action

In App Builder, you can use a single datastore action to reference multiple datastores. In the example below, a selector controls which datastore is displayed in the table. The app uses a single List Items datastore action.

Note: The datastore in this example uses pseudodata for demonstration purposes.

You can reference multiple datastores with a single datastore action

This app uses multiple datasets by:

  • Referencing each datastore’s UUID as the value in the selector component:
    ${[
      {
          "label": "Datastore 1",
          "value": "ae729fad-425f-4e54-b70b-f228768e66b6"
      },
      {
          "label": "Datastore 2",
          "value": "c190f470-8850-4651-9a36-781030827468"
      }
     ]}
    
  • Using the expression ${select0?.value} in the List Items action to list the entries from the selected datastore.

The table uses the output from the List Items action to display the data from the datastore.

Retrieve a UUID

To retrieve the UUID for a datastore:

  1. On the Datastore page, locate your datastore in the list and click to open it.
  2. Click Table Options > Copy datastore UUID.

Use a datastore in a workflow

To use a datastore in an existing workflow, add a datastore action:

  1. Click the plus (+) icon to add a step to your workflow.

  2. Search for datastore and select a Datastore action to add to your workflow. For a list of available datastore actions, see the Action Catalog.

  3. Click on the step in the workflow canvas.

  4. From the Datastore ID drop-down menu, select an existing datastore, or select New Datastore to create one.

    Add the datastore from an App Builder action

Update a Datastore with Terraform

You can use a workflow to update a Datastore with Terraform by following these steps:

  1. Initialize a datastore by creating one from the UI.
  2. Use Terraform to define a workflow that updates the datastore.
  3. Run the workflow to create or modify rows in the datastore.

Further reading

PREVIEWING: heston/datastore-additions