Configuration¶
This section explains the different settings you need in the DataSync's
appsettings.json
file in order to configure it.
Template options¶
To configure DataSync's templates you need to define the
DataSyncTemplateOptions
in the appsettings.json
file. This configuration has
the following structure:
Where:
- TemplatesFolderPath: is the directory path where DataSync has to
search the template
.json
files.
Connections options¶
To configure each application's database connection, you need to define the
ConnectionStringsOptions
in the appsettings.json
file. This configuration
has the following structure:
Connection for application template¶
Each ConnectionForApplication
contains the necessary data to get a valid
connection string for an application's database. They have the following
structure:
JSON | |
---|---|
Where:
- ApplicationCode: is the code of the application.
- Version: is the version of the application.
- ConnectionString: is the base connection string to connect the application's database.
- Password: is the password to be set in the connection string to be able
to connect to the database. If it has any value, it will override any
password specified in the base
`ConnectionString
. - PasswordIsEncrypted: is a value that indicates whether the provided
Password
is encrypted or not. It isfalse
by default.
Data gathering options¶
To configure DataSync's Data-gathering you will need to add the configurations according to the provider you need:
Core Services provider¶
To use Core Services as provider:
JSON | |
---|---|
Where:
- CoreUrl: is the url to communicate with Core Services.
- ClientId: is the DataSync application client Id, which you can check on Core Administration.
- Scopes: the list of scopes needed by DataSync to use Core Services.
- CoreVersion: version of the Core Services' API to use.
Gateway options¶
To configure DataSync's Gateway you will need to add the configurations according to the provider you need:
File system¶
To use File system gateway provider:
Where:
- BasePath: is the directory path where DataSync will create different sub-folders to hold its files.
- MaxFileSize: is the max size in bytes that the files to transport are allowed to have, this affects how File Splitting will behave. The default value is 100MB
Scheduling options¶
To configure DataSync's schedules you need to define the
DatasyncSchedulingOptions
in the appsettings.json
file. This configuration
has the following structure:
Scheduled replication template¶
Each ScheduledReplicationTemplate
has the necessary information for initialize
replication operations and must follow the format below:
JSON | |
---|---|
Where:
- Id: is the Id of the
ScheduledReplicationTemplate
. - Applications: is a list of applications that will perform the replication process.
- Sites: is a list of Sites which will be replicated.
- ProcessType: is the type of the replication that will perform. It can be
Export
,Import
orImportExport
(which performs first an import and then an export). - IgnoreSequenceNumber: this field indicates when the sequence number in an Import Replication will be ignored. Use false by default.
Example:
Notification options¶
To use
Notifications service
you need to define the DataSyncNotificationsModuleOptions
in the
appsettings.json
file, adding notification configurations according to your
needs:
JSON | |
---|---|
Notification configuration template¶
Each notification configuration
represents a notification to be sent, and must
follow this format:
Where:
- Recipients: is a list with the emails of the notification recipients. It must not be null nor empty.
- Applications: is a list with the
Application
Codes of interest for the notification. If null or empty, the notification will refer to all applications. - Events: is the kind of events that trigger this notification. It can be
set to:
All
(any replication event) orFailure
(only when an error happens). If null, the default value isFailure
.
DbManager options¶
To configure the way DataSync performs import operations into the database you
need to define the DbManagerOptions
in the appsettings.json
file. This
configuration has the following structure:
Where:
- BatchSize: sets the amount of rows the DbManager will try to import at a time if bulk operations are enabled.
- AllowBulkOperations: enables/disables bulk operations.
- AllowTemporalTableUsage: allows or prevents the use of temporal tables to perform the import operations if bulk operations are enabled. It greatly improves the performance but may be limited by the underlying database engine.
Warning
The BatchSize must be a value greater than 0, and if the value is less than 10 then no bulk operations will be performed.
Warning
AllowTemporalTableUsage should be disabled for databases in SQLServer versions lower than 2016.