Skip to main content
A datasource connects an app to a database or to file storage. Once connected, agents, workflows and your application read and write it through the app’s API, with one authentication model, one response format and, optionally, an audit trail.

Adding a datasource

Go to Datasources → Create Datasource, enter a Datasource Name, choose the Datasource Type, add an optional description, and paste the Connection Configuration (JSON). The dialog shows a sample configuration for the chosen type.
Connection configuration by type: Check a connection from the datasource’s page in the console, or with POST /floware/v1/datasources/<id>/test-connection.
Give Wavefront a database user with only the permissions your workflows need: read on the tables they query, insert or update on the tables they write.

Reading data: use dynamic queries

Read your own tables with dynamic queries: named SQL saved on the datasource and run with parameters. They can join, aggregate and return several result sets in one call.
The generic table-read route (GET /floware/v1/datasources/<id>/resources/<table>) is restricted to a few built-in tables. For your own tables it answers “Invalid resource name”. Use a dynamic query instead.

Writing data

Writes go through the table routes. Each one records an audit entry when auditing is enabled.

Insert

Update

Delete

Update and delete need a non-empty filter, and return how many rows they touched (updated_rows, deleted_rows).

Several tables at once

From a workflow, use the datasource_insert_rows and datasource_insert_multi nodes.

Filters

Updates, deletes and dynamic queries’ {{filters}} take a filter expression: Quote text values with single quotes.
Join conditions with $and / $or (or uppercase AND / OR), never lowercase and / or. A lowercase and is not rejected: everything after it is silently ignored. order_id eq 'O-1' and status eq 'OPEN' updates or deletes every row with order_id 'O-1', whatever its status. This is a known issue (#446); until it is fixed, check your filters, and check updated_rows / deleted_rows in the response.
ne (not equal) is not supported in update and delete filters.

Other routes

Who can do what

  • Admins can add, change and delete datasources, define dynamic queries, and read and write data.
  • Other users need data permissions assigned to them; without them, reads answer “Data access not set for non-admin user”. A deployment can open data access to all signed-in users with a feature flag. See Users and access.