Replication package is a specific kind of a package, which loads data from cloud applications to a relational database.
To create a Replication package, perform the following actions:
Skyvia does not support automatic metadata changes detection. If metadata is changed in your cloud data source, a replication package will continue to run knowing nothing about these changes. If a new field is added in a replicated object, the replication will continue working, but the new field won't be replicated. If a replicated field or a replicated object is deleted or renamed in the data source, the replication package will start failing until you perform the necessary changes to it.
In order to detect these metadata changes in a replication package, you need to perform the following steps:
After this, the tables must be re-created in order to have columns for the new fields and don't have columns for deleted fields. If you haven't added any new objects to the package, select the Create Tables and Drop Tables check boxes in order to re-create the tables. You don't need to clear the Drop Tables check box after this even when the Incremental Updates check box is selected. In the latter case, the Create Tables and Drop Tables options are applied only for the first replication, or when the LastSyncTime parameter is reset. See the Replication Package Settings in Details section below for more information.
However, if you added any new objects to the replication, you cannot simply select the Drop Tables check box. In this case the replication package will try dropping tables for the new objects too, and since there are no such tables in the target database, it will fail. So you may either manually drop all the tables for the package and don't select the Drop Tables check box, or select this check box and create the missing tables with the names of the new cloud objects in the database manually.
Incremental Updates Are Not Selected
When the Incremental Updates check box is NOT selected, the Create Tables and Drop Tables options are applied every time a replication package is run.
If Create Tables is selected, Skyvia will attempt to create tables for all the objects selected. So, if there is any table with such a name in a database, the package will fail. If you simply rename tables left from the previous replication, their constraints may still have the same name, and you will get an error about constraint with the same name.
So, if Create Tables is selected and Drop Tables is not selected, there must be no tables with the names of replicated objects in the target database for the package to succeed.
If Drop Tables is also selected, Skyvia will try to delete tables for all the replicated objects before creating them. If there is NO such table for any of the objects, the package will fail.
So, if both Create Tables and Drop Tables check boxes are selected, the tables for ALL the replicated objects must be present in the database in order for package to succeed.
If there are tables only for a part of the replicated objects in the database, there is no working option combination for this case, and you will have to delete the tables manually.
Incremental Updates Are Selected
When the Incremental Updates check box is selected, the Create Tables and Drop Tables options are applied in the following cases:
1. The first package run after package creation.
2. The first package run after resetting the package LastSyncTime parameter.
In these cases you need to consider the information above.
The LastSyncTime parameter can be reset in two cases. It can be reset manually, in the package editor. Or, whenever you perform any package modification except for changing the package schedule, Skyvia offers you the choice whether to reset this parameter and run the next replication as in the first time (full replication with optional table creation).
In Skyvia, Replication packages have the following parameter.