Get started with a free trial today
Already have an account? Sign in
Replicating a database view is almost the same as replicating a database table. In this guide, we’ll cover the database integrations that support views and the additional steps required to replicate a database view.
Database views can be replicated from the following database integrations only:
To replicate a database view, follow these steps:
To replicate the view, the Stitch database user must have the appropriate level of permissions to access it.
If you don’t see the view you want in the Stitch app, it may be because the Stitch user has insufficient permissions. Verify that the Stitch user’s permissions and, if necessary, grant any that are missing.
For a refresher on the permissions Stitch needs, refer to the articles linked below:
Note:Parent objects - like the database containing the view - must also be set to replicate. If they aren’t, set them to replicate before continuing.
Next, you’ll define the Primary Key setting for the view. There are two options:
Note: You can change the Primary Key setting - including adding or removing fields to the Custom Primary Key - at any time, but doing so will require a full re-replication of the view. This is to ensure that there aren’t any gaps in the data.
The last step is to define the view’s Replication Method. Replication Methods tell Stitch how to extract data from a source table, which will directly impact your overall row usage.
The following Replication Methods are available for use with database views:
Key-based Incremental Replication: This method will only replicate new and updated data, based on the Replication Key column you define.A Replication Key is required to use this method. Refer to theReplication Key documentation for more info.
Full Table Replication: This method will replicate the view in full during every replication job.
Once you’ve defined the view’s Primary Key(s) and Replication Method, click theSave Settings button.
During the next replication job, Stitch will replicate the view according to the settings you defined.
| Related | Troubleshooting |
Did this article help? If you have questions or feedback, feel free tosubmit a pull request with your suggestions,open an issue on GitHub, orreach out to us.