Using SQL Database as a Data Source for the Indicators

Use an external database as a data source for your KPIs. Setup SQL Indicators to access remote database.

Create a Datasource

  1. Click > Settings > Integrations tab
  2. In the Datasources section click Add to add a new datasource

Setup SQL Indicator

  1. Open a scorecard, go to the KPIs tab
  2. Select an indicator that will be a recipient of data
  3. Switch to the Data tab, click on the Data source button next to the Value field
  4. Data source button

  5. Click on the SQL Query button
  6. Formulate required SQL query (see some examples below).
  7. Click on the Next button to preview the results. Click on the Finish button.
Examples:

Examples of SQL Queries

BSC Designer expects to receive one value as a response to the SQL query. The received data will be used for the Value field of the indicator.

Supported parameters:

Case 1: Indicator is updated daily. There is one value for each date.

select value from datatable where date = %%date%%

Case 2 (most used): Indicator is updated monthly. There are several values for this period in the database that need to be summarized.

select sum(value) from datatable where date between %%UpdatePeriodStart%% and %%UpdatePeriodEnd%%

Right to Create SQL Indicators

By default, power users don't have a right to create new SQL indicators. To grant this right:

  1. Go to the > Users section
  2. Click the Edit button for a user
  3. Use the Allow use external datasources checkbox
  4. Press Save button

Updating Data

There are several ways to update data for SQL indicators:

  • Video tutorials