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.
Workflow Automation
To create a workflow from a datastore:
- On the Datastore page, locate your datastore in the list and click to open it.
- 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:
- On the Datastore page, locate your datastore in the list and click to open it.
- 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:
Click the Data ({ }) icon to open the Data tab.
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.
Choose an existing connection or create one.
From the Datastore ID drop-down menu, select an existing datastore, or select New Datastore to create one.
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.
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:
- On the Datastore page, locate your datastore in the list and click to open it.
- Click Table Options > Copy datastore UUID.
Use a datastore in a workflow
To use a datastore in an existing workflow, add a datastore action:
Click the plus (+) icon to add a step to your workflow.
Search for datastore
and select a Datastore action to add to your workflow. For a list of available datastore actions, see the Action Catalog.
Click on the step in the workflow canvas.
From the Datastore ID drop-down menu, select an existing datastore, or select New Datastore to create one.
You can use a workflow to update a Datastore with Terraform by following these steps:
- Initialize a datastore by creating one from the UI.
- Use Terraform to define a workflow that updates the datastore.
- Run the workflow to create or modify rows in the datastore.
Further reading
Additional helpful documentation, links, and articles: