Data source parameters

Give report editors a way to customize the data source.

This feature is currently only available for data sources built with community connectors.

Data source parameters allow report editors to override default values in a data source. This makes data sources more flexible, and gives you another way to easily create report templates.

For example, a connector providing weather data might include a location parameter that lets editors request a weather report from the specified locale.

In this article:

How data source parameters work

Data source parameters appear in 3 places: in the connector, in the data source, and in the report:

In the connector

Connectors use parameters to request data from the underlying data set. For example, a weather data connector could use a Units parameter to request temperatures in either Celsius or Fahrenheit. 

The connector's developer sets default values for each parameter. The connector developer also determines which parameters can be modified in data sources.

Data source and report editors can't change the default settings in the connector.

In the data source

Modifiable parameters appear in the data source connection page. Data source editors can set new default values for these parameters. If the connector allows it, data source editors can also specify the parameters that can be modified in reports.

Example of configuring data source parameters.

In the report

Modifiable parameters appear in a report component's DATA properties panel. You can also edit parameters in the report, page, and group properties panels.

Example of configuring  parameters in a report.

Report viewers can't modify data source parameters.

Example of using parameters in a report

Let's say the weather connector provides 2 parameters: one for ZIP/postal code, and another for the temperature scale (Celsius vs. Fahrenheit). Both are set as editable in reports. The creator of the connector sets the default values to 94043 for the ZIP code, and Fahrenheit for the scale.

You create a data source using this connector. You decide to change ZIP code to 95060, and leave the default scale as Fahrenheit. You also allow both of these parameters to be editable in reports.

Next, you create a report from this data source and add a table showing the city and temperature fields. The table shows data for Santa Cruz, CA, with temperatures in Fahrenheit.

You then share the report with your colleague Sarah in London, giving her edit permission. Sarah edits the table's parameters to SW1A 1AA, and Celsius. The table updates to show weather for the City of Westminster, with temperatures measured in Celsius.

How parameters share your data in reports

Parameters let report editors request additional or different data from the default. Before you enable parameters for your data source, be sure you understand how the connector uses those parameters. Some parameters may only return relatively innocuous data, like weather in a new locale. Other parameters, however, might allow someone to request entirely new data sets. For example, an account number parameter, or name of a database table would potentially return data you didn't intend to share, or perhaps come back with a different schema (which might result in broken charts).

In short, keep in mind that other editors of your reports and data sources are able to access any data that is controlled by parameters.

Allow data source parameters in reports

To allow report editors to edit parameters:

  1. Sign in to Data Studio.
  2. Navigate to the DATA SOURCES tab
  3. Click Create new report or data source..
  4. Select a connector and, if necessary, authorize your connection.
  5. If the connector provides editable parameters, they appear at the bottom of the page.
  6. Use the Allow <parameter name> to be modified in reports checkboxes on the right to allow or disallow editing the parameter in reports.
  7. In the top right, click CONNECT.
  8. Click CREATE REPORT in the upper right.

Modify parameters in a report

To change data source parameters in a chart or control:

  1. Edit the report.
  2. Add a new chart or control, or select an existing one.
  3. At the bottom of the chart or control's DATA tab, edit the parameter values.

You can also edit parameters at the report and page level:

  1. Edit the report.
  2. Select File > Report Settings or Page > Current Page Settings.
  3. Edit the parameter values.

Parameter inheritance

Parameters follow the same rules for inheritance as filter properties. Specifically, parameters on higher precedence components override the parameters on lower precedence components. The order of precedence (from lowest to highest) is:

  1. Data source (default)
  2. Report
  3. Page
  4. Group
  5. Individual chart or control

Inheritance example

You create a report using the example weather data source described above. This data source has a default ZIP code of 94043. If you add a table containing the City field to the report, it will inherit this value and display data for Mountain View, CA.

You then edit the report settings, and enter a ZIP code of 10011. Report level parameters are higher precedence than data source parameters, so the the table updates to show weather for New York, NY.

Next, you edit the page settings, and set the ZIP code parameter to 90210. Page setting parameters are higher precedence than report and data source parameters, so the the table updates to show weather for Beverly Hills, CA.

If you add a new table, it uses the highest precedence parameter, which is the current page setting of 90210.

Now, group the charts on the page. With the group selected, you can override both charts and set ZIP to 50475. Group level parameters are higher precedence than page, report, and data source parameters, so both charts now show the weather for Sheffield, IA.

Finally, select one of the tables and set its ZIP code parameter to 86023. Individual component parameters are higher precedence than group, page, report, and data source parameters, so that one table updates to show weather for Grand Canyon, AZ.

Copy a component with parameters

Copying a component copies its parameters. You can override the copy's parameters by editing the component, as usual.

Fix invalid parameters

If the parameter configuration changes in the connector, any charts using those parameters may break. For example, the connector's developer may remove the ability to override a parameter value, and the value you've provided in the report no longer returns valid data. In this case, you'll see an error message in any charts impacted by that change.

To fix this, locate the component containing the now-invalid parameter. Then, in the Parameters section of that component's DATA properties, click Fix Invalid Values.

Remember that parameters can be set at the report, page, and group level, as well as on individual charts, so you may need to look in several places to find and fix the error.

Limits of data source parameters

Modifiable parameters are currently only available in community connectors.

Only data source and report editors can change parameter values. Report viewers have no control over data source parameters.

Once you've created a data source, changes to the parameters in the connector won't appear in the data source automatically. You'll need to reconnect the data source to see any new, removed, or changed parameters.

As noted above, changes to parameters in the connector can cause errors in your charts.

Learn more about reconnecting a data source.

Overriding connector parameters in reports (Community Connectors Developer Guide)

Was this article helpful?
How can we improve it?