Persist Data in a Graphical or SQL View

Improve the performance while working with views by persisting the view data, and scheduling regular updates to keep your data up-to-date.

By default a view is run every time it is accessed and, if the view is complex or a large amount of data is processed, this may impact the performance of other views or dashboards built on top of it. You can improve performance by persisting the view data and you can schedule regular updates to keep the data fresh.
When opening your view, in the Properties panel, under Data Persistence, you can see if your view has been made persisted or not.

Information

Description

Data Access

Shows how you currently access your view.

  • Persisted: The view is persisted can be used immediately.

  • Partially Persisted: Not all view data has been persisted. If your view contains an input parameter, only records that match the input parameter default value are persisted.

  • Virtual: The view is accessed directly, no intermediate persistence is used. Or the view was persisted and has now been turned into virtual to free up memory space, for example.

Status

Shows the status of the persisted view.

  • Available: The persisted view is available and can be used.

  • Loading: The persisted view is currently creating or updating. You might need to refresh your screen until the loading is completed to get the final status. Until then the virtual access or the old persisted data is used if the view is accessed.

  • Error: Something goes wrong during the load of the data to the persisted table. The old persisted data is used or if the view was not successfully loaded before, the data is still accessed via virtual access (status is virtual). You need to fix the error to be able to complete the persisted view creation or update.

Last updated

Shows when the persisted view was last updated.

You can perform actions on data by clicking Data Persistence:
  • Start Data Persistence: Start a new data persistence to update or create the persisted view.
  • Remove Persisted Data: Remove the data that have been persisted in the view and switch the access back to virtual.

Schedule Data Persistence Tasks

Schedule Data Persistence

From this menu, you can :
  • Create Schedule: Select the relevant persisted view and create a simple or recurring schedule for your view. You define your scheduling options and thus ensure that you always have an up-to-date persisted view.

    Edit Schedule: Your scheduling options need to be updated? You can adapt them to your needs at any time from this menu.

  • Delete Schedule: You don't need to schedule a Data Persistence task anymore? Then you can simply delete it from this menu.

  • Assign Schedule To Me: Become the owner of the schedule.

  • Pause Schedule: Pause the scheduled task

  • Resume Schedule: Resume the pause scheduled task

For more information, see Schedule a Data Integration Task (Simple Schedule).

Persisted Views and Input Parameters

Data persistence can be run in case a view contains a parameter only if the following prerequisites are met:
  • The view contains one single input parameter,

  • The input parameter has a default value maintained.

If a view contains several input parameters, or if the input parameter has no default value, the view can’t be persisted.

Once persisted, the view takes the data access value Partially Persisted because only records that match the input parameter default value are persisted.

Persisted Views and Deployment

When you deploy a persisted view, you need to consider the following cases:
  • If you update or redeploy a persisted view, you need the right permission level (Data Integration - Update). For more information, see Privileges and Permissions. Note that after a redeployment, the data persistence might be deleted and the data access could be changed back to virtual for views with structural changes. This will happen as soon as the underlying database object is recreated as part of the deployment. This can be seen in the Data Access status in the View Builder or in the Data Integration monitoring app > Views again.

  • If the view uses other views that were changed but not yet deployed, they are deployed as well. If these views are persisted, the persistence is deleted as well.

  • If the view uses other views that were not changed, these views are not touched by the deployment and therefore the persistence is still available

  • If you update or redeploy a view while you are persisting data, the persistence will fail. In this case, try again to persist the view or wait until the next scheduled run.

  • If the persisted view is consuming a view for which a data access control has changed (a data access control is added or removed, or its assignment has changed), then the persistence of your parent view is removed when the underlying view is redeployed.

Persisted Views and Data Access Control

While defining Data Access Control in your view, you need to consider the impact on the persistency. For more information, see Persisted Views and Data Access Control.