Self-hosted
Permanent data set filters

This feature is currently only available by editing the config JSON structure directly. You will not be able to configure permanent data set filters via the UI of the Query Engine.

Permanent data set filters

Sometimes, you will want a data set have already filtered out some data from the underlying database, before you start adding secure filters in your identity logic or filters on the dashboard itself.

JSON structure

The structure of the permanentFilters property is the same as a Vizzly query filter. Here is an example;

{
  // ... Other data set properties, such as `id`, `name` and `fields` ...
  permanentFilters: {
    type: 'andWhere',
    value: [
      {
        type: "where",
        value: {
          field: {
            type: "field",
            value: "<<ID of a field from the data set >>",
            function: "none"
          },
          op: "=",
          value: "<< a value to filter on >>",
        },
      },
      {
        type: "where",
        value: {
          field: {
            type: "field",
            value: "<<ID of a field from the data set >>",
            function: "none"
          },
          op: "=",
          value: "<< a value to filter on >>",
        },
      }
    ]
  }
}

Performance & indexing

These permanent filters will be added at the beginning of the WHERE clause. This will allow you to make smart indexing decisions for your database and to optimise the performance of queries.