Configuration Parameters Shared by Applications
The following is an example of the configuration file fragment in the YAML format that lists configuration parameters used both in procopy and prosync:
source:
driver_name: oracle
host: enter host
port: 1521
database: enter database
username: enter username
password: enter password if necessary
max_conn: 50
options:
- PREFETCH_ROWS=500
destination:
driver_name: postgresql
host: enter host
port: 5432
database: enter database
username: enter username
password: enter password if necessary
max_conn: 50
options:
- sslmode=disable
tasks:
- id: tab1
table:
source_table: source_table
destination_table: destination_table
include_columns:
- field1
- field2
- field3
- field4
column_mapping:
field1: field2
field2: field1
where: (COL1 IS NULL OR COL1 > 10) AND COL2 <> 'value'
batch_bytes: 976.6KiB
truncate: false
transform:
field1:
null_to_value: ""
field2:
values_to_null:
- "NULL"
- NULL_VAL
- INVALID
snapshot_id: null
- id: tab2
query:
sql: SELECT id, name FROM users ORDER BY id
destination_table: users_table
destination_columns:
- id
- login
batch_bytes: 976.6KiB
truncate: false
snapshot_id: null
- id: schema_task
schema:
source_schema: schema1
destination_schema: schema2
include_tables:
- TABLE1
- TABLE2
table_mapping:
TABLE2: main_table
batch_bytes: 976.6KiB
truncate: false
snapshot_id: null
For how to set values for time configuration parameters, refer to Setting Time Values.
The following table explains configuration parameters that are used both in procopy and prosync:
| Name | Description | Default Value | Example |
|---|---|---|---|
|
Parameters to connect to the source |
||
DSN for the connection. If specified, this parameter has precedence: it defines the actual settings. |
For BiHA cluster: dsn: "postgresql://db-biha-1:5432, db-biha-2:5432, db-biha-3:5432/postgres?user=user& password=password" |
||
Driver for the connection. Possible values: |
|||
|
Host name or IP address |
||
|
Connection port |
||
|
Name of the database to connect to |
||
|
Connection login |
||
|
Connection password. Leave empty if the password is not required. |
||
|
Maximum number of open connections |
|
|
|
Additional connection parameters |
|
|
Connection parameters for Postgres Pro Shardman, where each key is a shard name and the corresponding value is the connection parameters for the shard. Only used when |
|
||
|
Postgres Pro Shardman source configuration. Only used when |
0 |
|
|
Postgres Pro Shardman API port. |
||
|
Connect to Postgres Pro Shardman API through HTTPS. |
|
|
|
Skip verification of the server’s transport layer security (TLS) certificate (for example, self-signed certificates). |
|
|
|
Timeout of HTTP requests to Postgres Pro Shardman API. |
|
|
|
Parameters to connect to the destination |
||
DSN for the connection. If specified, this parameter has precedence: it defines the actual settings. |
For BiHA cluster: dsn: "postgresql://db-biha-1:5432, db-biha-2:5432, db-biha-3:5432/postgres?user=user& password=password" |
||
Driver for the connection. Possible values: |
|||
|
Host name or IP address |
||
|
Connection port |
||
|
Name of the database to connect to |
||
Absolute or relative path to the directory where files are stored for a |
|
||
Connection login |
|||
|
Connection password. Leave empty if the password is not required. |
||
|
Maximum number of connections allowed for the connection pool |
|
|
|
Additional connection parameters |
|
|
|
Name of the shard to be used as the destination for this task. |
||
Connection parameters for Postgres Pro Shardman, where each key is a shard name and the corresponding value is the connection parameters for the shard. Only used when |
|
||
|
Postgres Pro Shardman destination configuration. Only used when |
0 |
|
|
Postgres Pro Shardman API port. |
||
|
Connect to Postgres Pro Shardman API through HTTPS. |
|
|
|
Skip verification of the server’s transport layer security (TLS) certificate (for example, self-signed certificates). |
|
|
|
Timeout of HTTP requests to Postgres Pro Shardman API. |
|
|
|
Path to the Postgres Pro AXE files inside the bucket or in the local file system. This parameter is required even for an S3 bucket, because Postgres Pro AXE requires files outside the bucket root. It is used only when |
|
|
|
Name of the directory on the Postgres Pro AXE server where Parquet files are placed. This parameter must match the name of the directory created by the |
|
|
|
Path of the directory on the Postgres Pro AXE server where Parquet files are placed, relative to |
|
|
|
Section that specifies where procopy writes Parquet files: to a local directory or to an S3 bucket. It is used only when |
||
|
Path to the local directory where Parquet files are stored. Specify either this parameter or |
|
|
|
Section that specifies the connection to an S3 bucket where Parquet files are stored. Specify either this parameter or |
||
|
Name of the S3 bucket. |
|
|
|
Region of the S3 bucket. |
|
|
|
Endpoint (URL) of the S3 service. |
||
|
Path to the certificate used for authorization. This is an optional parameter. |
||
|
Access key for S3 authorization. |
||
|
Secret key for S3 authorization. |
||
|
Path where procopy temporarily stores files before uploading them to the S3 bucket. |
|
|
List of tasks. A task can be of the |
|||
Task name. Must be unique. It is recommended to avoid changing it between tasks. |
|
||
Section for a task of the |
|||
|
Qualified name of the source table: |
source_table: "SYSTEM"."PRODUCTS" |
|
|
Qualified name of the destination table: |
destination_table: "public"."products" |
|
List of columns to exclude from data loading. List columns with case-sensitive names exactly as they are called in the source DB. Quotes are not needed. Incompatible with |
|
||
List of columns such that only these columns will be loaded. List columns with case-sensitive names exactly as they are called in the source DB. Quotes are not needed. Incompatible with |
|
||
Mapping of column names in the source database to names in the destination database if these names are different, in the format |
|
||
Filtering conditions for the source table, which enables limiting the number of rows to load. An SQL statement that returns |
|
||
For a Postgres Pro Shardman destination, mapping of filtering conditions for source table rows to shards in the destination cluster. When transferring data to sharded or global tables, this parameter is ignored and all the rows are sent to the first shard. |
|
||
Allows casting values of string columns, used in filtering conditions of |
|
||
Value to be used for a column that could not be cast to a numeric type when |
|||
|
Log each table row where |
false |
|
Transfer operations on this table with a single loader if |
|||
|
Unique key to be used for the selection. If not specified, the most suitable key will be chosen automatically. |
||
|
Deprecated |
||
|
A hint for an index name to be used for an index scan. In some situations, the index that is actually chosen for the index scan can differ from the one specified. |
|
|
|
Disables sorting during a selection. If not specified, the global setting from |
||
|
Name of the shard to be used as the destination for this task. |
||
Section for a task of the |
|||
|
User’s SQL query for the task |
|
|
|
Qualified name of the destination table: |
destination_table: "public"."products" |
|
List of destination columns where data will be inserted. Column names must be in the same order as in the query. List columns with case-sensitive names exactly as they are called in the destination DB. Quotes are not needed. |
|
||
|
Types of destination columns where data will be inserted. Must be listed in the same order as in |
For migration PostgreSQL → Parquet:
|
|
Section for a task of the |
|||
|
Name of the source schema to load. Must be exactly as in the database. No quotes are needed. |
|
|
|
Name of the destination schema. Must be exactly as in the database. No quotes are needed. |
|
|
List of tables to exclude from the data loading. List tables with case-sensitive names exactly as they are called in the source DB. Quotes are not needed. Incompatible with |
|
||
List of tables such that only these tables will be loaded. List tables with case-sensitive names exactly as they are called in the source DB. Quotes are not needed. Incompatible with |
|
||
Mapping of table names in the source database to names in the destination database if these names are different, in the format |
|
||
Limitation on the batch size for the current task, in bytes. If not specified, the global limitation |
|||
If enabled, a destination table (tables) will be truncated before the data loading. If not specified, the global flag |
|||
|
Allows you to rerun the task without changing its |
||
Rules to transform null values of the specified columns. Each rule can contain the following fields:
|
|
||
|
Disables index hints when creating select queries. If not specified, the global flag |
||
|
Size of the sliding window. Number of rows selected at a time. If not specified, the global value of the |
||
|
Size of a buffer used by encoders. |
||
Identifier of the PostgreSQL/Postgres Pro snapshot. If not specified, the global value of the |
|||
If true, a snapshot is created in PostgreSQL/Postgres Pro to be used to get data. |
|||
Deprecated. Use |
|
||
Number of subtasks for parallel reading of tables. Used to split reading large tables into subtasks. The value of zero turns off splitting into subtasks. The maximum value is 1000. |
|||
|
Skip the specified operations. You can specify update, delete, or truncate operations. Be cautious: if it is specified to skip delete operations and you skip delete operations with a certain key,
|
||
Parameters to connect to the supporting DB to be used to store transactions. If not specified, the destination DB is used. |
|||
|
DSN for the connection. If specified, this parameter has precedence: it defines the actual settings. |
For BiHA cluster: dsn: "postgresql://db-biha-1:5432, db-biha-2:5432, db-biha-3:5432/postgres?user=user& password=password" |
|
|
Driver for the connection. Possible values: |
||
|
Host name or IP address |
||
|
Connection port |
||
|
Name of the database to connect to |
||
|
Connection login |
||
|
Connection password. Leave empty if the password is not required. |
||
|
Maximum number of open connections |
|
|
|
Additional connection parameters |
|
|
Parameters to connect to the supporting DB to be used to store the prosync state. If not specified, the destination DB is used. |
|||
|
DSN for the connection. If specified, this parameter has precedence: it defines the actual settings. |
For BiHA cluster: dsn: "postgresql://db-biha-1:5432, db-biha-2:5432, db-biha-3:5432/postgres?user=user& password=password" |
|
Driver for the connection. Possible values: |
|||
|
Host name or IP address |
||
|
Connection port |
||
|
Name of the database to connect to. A Postgres Pro Shardman database cannot be used. You can connect to a single shard with the |
||
|
Connection login |
||
|
Connection password. Leave empty if the password is not required. |
||
|
Maximum number of open connections |
|
|
|
Additional connection parameters |
|