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. 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 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 any package modification except for changing the package schedule.
The second case includes changing these replication options. So if you select the "Incremental Updates" check box for an already existing package, Skyvia will still try creating tables again during the first run after this check box selection. So, if you want to select the "Incremental Updates" check box for a package that already created the tables, you will need either to select the "Drop Tables" check box too or delete tables manually. (Selecting the "Drop Tables" check box won't hurt incremental updates, because it is applied only for the first run after package modification. When "Incremental Updates" check box is selected, tables are not recreated each time even if "Create Tables" and "Drop Tables" check boxes are selected.)
In Skyvia, Replication packages have the following parameter.