# Data Providers

{% hint style="info" %}
Data Provider editing and creation is an advanced topic. It is recommended to use the existing Data Providers if you create your own Dashboards. Please reach out to our [Support Team](https://adaptiva.com/support) for assistance.

Additionally, editing and creating data providers is currently unavailable for SaaS implementations of the Platform.For security reasons, SaaS environment signed data providers are only permitted. Please reach out to our [Support team](https://adaptiva.com/support) for assistance.
{% endhint %}

A Dashboard uses results from queries to display data in meaningful ways. Data Providers are used to create the query. A Data Provider can include many data sets. It is recommended to create a single Data Provider for each Dashboard, but it is, of course, possible to use Data Sets from any Data Provider in a single Dashboard.

Data Providers are a platform-level component and can therefore be accessed when viewing any Adaptiva product from the side navigation. Navigate to **Dashboards > Data Providers**.

## Data provider types

There are currently two types of Data Providers:

* Adaptiva SQL - queries data from the Adaptiva SQL database
* Workflow - executes a workflow to return data

## Data Sets

Data sets include the data you want to extract to display depending on the chosen dashboard widget. For instance, you have the option to determine what data to include in a table widget column(s). This data is requested by either a SQL query or a Workflow depending on the data provider type chosen.

## Create a Data Provider

For this example, we will be querying from the SENSOR\_200000017\_DATA table (BIOS sensor). The columns we will be selecting will be the Client ID, the BIOS Name, the Manufacturer, the SerialNumber, and the SMBIOSBIOSVersion.

1. Select **Dashboards > Data Providers** from the side navigation under **Platform Features**.
2. Select **+ New**.
3. Enter a unique data provider **Name** and **Description** to help the user understand the result of the data provider.
4. Select **Adaptiva SQL** from the Data Provider Type dropdown.
5. Select **+ Add Data Set**.
6. Enter a unique data set **Name** and **Description**.
7. Select **+ Add Column** and create a column to match data in your SQL query.

   ![](https://4278434842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6zWDkRrsxRGskacChCcP%2Fuploads%2Fgit-blob-c0ae080540f9a1bfe7db381b6e6c2b40a426d1c5%2Fadd-column.png?alt=media)
8. Enter the **Data Query** in the code block field. For example:

   ```sql
   SELECT _SOC_ClientId, [Name], Manufacturer, SerialNumber, SMBIOSBIOSVersion 
   FROM SENSOR_200000017_DATA
   ```
9. Enter the **Count Query**.

   ```sql
   SELECT COUNT(*) FROM (
   SELECT _SOC_ClientId, [Name], Manufacturer, SerialNumber, SMBIOSBIOSVersion
   FROM SENSOR_200000017_DATA
   ) X
   ```
10. (Optional) Select desired options for **Default Sort Configuration**.
11. (Optional) If the SQL query takes input parameters, select **+ Add Properties**.
12. Click **Submit**.
13. Click **Save**

### Workflow Data Sets

Workflow data sets can be used to query data outside of the Adaptiva database, this is an advanced use case and we recommend reaching out to our [Support team](https://adaptiva.com/support) for assistance.

If you choose to use a Workflow data set, you will still follow the majority of the steps above except:

1. Select **Workflow** from the Data Provider Type dropdown.
2. When adding a data set, select **Browse** to choose a workflow you'd like to use.
