- Overview
- Environment
- Quick Start
- Configuration
- Commands
- mtk
- init-project
- config
- license
- mig
- show
- sync
- sync-schema
- sync-sequence
- sync-object-type
- sync-domain
- sync-wrapper
- sync-server
- sync-user-mapping
- sync-queue
- sync-table
- sync-nickname
- sync-rule
- sync-table-data
- sync-table-data-estimate
- sync-index
- sync-constraint
- sync-db-link
- sync-view
- sync-mview
- sync-function
- sync-procedure
- sync-package
- sync-trigger
- sync-synonym
- sync-table-data-com
- sync-alter-sequence
- sync-coll-statistics
- check-table-data
- gen
- gen completion
- encrypt
- convert-plsql
- report
- self
- mvd
- usql
- Graphical
- Faqs
- Release
MTK Parameter
Parameter
igErrorData
Type: bool
Desc: Ignores the data that failed to insert and logs to a file..
only support openGauss/MogDB/PostgreSQL/MySQL
-
openGauss/MogDB/PostgreSQL
batchCommit igErrorData copy Savepoint 描述 false false false all rollback false false true all rollback false true true Failed data not migrated true false false Keep successful Commit data true false true Keep successful Commit data true true true Failed data not migrated -
MySQL
batchCommit igErrorData 描述 false false all rollback false true Failed data not migrated true false Keep successful Commit data true true Failed data not migrated
Default: false
Add: v2.2.3
enableBatchCommit
Type: bool
Desc: enable batch commit
Default: false
Option:
- true
- false
replaceBCDate
Type: string
Desc: openGauss/MogDB/PostgreSQL time format does not support data before 4713 BC. Configuring this parameter will replace the data accordingly.
For example 9192-01-07 01:02:03 BC
replaced 1970-01-01 00:00:00
.
Example:
Replace BC Date Example
{
"replaceBCDate": "1970-01-01 00:00:00"
}
Add: v2.8.0
mySQLSkipErrorDateTimeData
Type: bool
Desc: Automatically skips the wrong time of MySQL.
For example, datetime
type:0000-00-00 13:14:15
Default: false
Deprecated: Versions from 2.3.4 onwards are no longer supported.
Option:
- true
- false
columnTypeData
Type: map[string]string
Desc: Customize the data conversion method for the column type. When the source configures this parameter,
it is used to generate a SELECT statement, and when the target configures this parameter,
it is used to generate an INSERT/COPY. The priority is lower than columnNameData
If the source configuration is "VARCHAR": S_DECODER({{.ColName}})
,
the generated query statement is SELECT S_DECODER(COL1) AS COL1 FROM S1.T1
If the target configuration is "VARCHAR": S_ENCODER({{.ColName}})
,
the generated query statement is INSERT INTO S1.T1 (COL1) VALUES(S_DECODER(:1))
or COPY S1.T1(col1) from stdin TRANSFORM(col1 AS S_ENCODER(COL1))
{{.ColName}} will be automatically replaced with columns. You can also write column names directly
Example:
Source ColumnType Data Process Example
{
"columnTypeData": {
"col_type_char": "trim({{.ColName}})",
"col_type_varchar": "trim({{.ColName}})"
}
}
Target ColumnName Data Process Example
{
"columnTypeData": {
"col_type_varchar": "trim({{.ColName}})"
}
}
Add: v2.8.4
columnNameData
Type: map[string]string
Desc: Custom processing data conversion method. When the source configures this parameter, it is used to generate a SELECT statement, and when the target configures this parameter, it is used to generate an INSERT/COPY.
For example, if the source configuration is "S1.T1.COL1": S_DECODER({{.ColName}})
,
the generated query statement is SELECT S_DECODER(COL1) AS COL1 FROM S1.T1
For example, if the target configuration is "S1.T1.COL1": S_ENCODER({{.ColName}})
,
the generated query statement is INSERT INTO S1.T1 (COL1) VALUES(S_DECODER(:1))
or
COPY S1. T1(col1) from stdin TRANSFORM(col1 AS S_ENCODER(COL1))
{{.ColName}}
will be automatically replaced with columns. You can also write column names directly
Example:
Source ColumnName Data Process Example
{
"columnNameData": {
"ora_mtk.tab_dbms_des.col2": "ora_mtk.s_decoder({{.ColName}})"
}
}
Target ColumnName Data Process Example
{
"columnNameData": {
"ora_mtk.tab_dbms_des.col2": "ora_mtk.s_encoder({{.ColName}})"
}
}
Add: v2.8.1
enableConvEmptyStringToSpace
Type: bool
Desc: For scenarios where there is an empty string for a non-null column, convert an empty string to a space
-
Mig DB2 To MogDB/openGauss A datcompatibility
-
DB2
create table tab_col_null_empty_string ( id bigint, col2 varchar(10) not null, col3 varchar(10) ); insert into tab_col_null_empty_string values (1,'',''); insert into tab_col_null_empty_string values (1,'',null); select * from tab_col_null_empty_string; ID|COL2|COL3| --+----+----+ 1 | ''| ''| 1 | ''|null|
-
MogDB A datcompatibility
select * from tab_col_null_empty_string; ID|COL2|COL3| --+----+----+ 1 | ' '|null| --> empty string to space 1 | ' '|null|
-
Default: false
Option:
- true
- false
compatibleIlLegaLChars
Type: bool
Desc: enable mogdb/openGauss copy option COMPATIBLE_ILLEGAL_CHARS
Default: false
Option:
- true
- false
enableEncodeValid
Type: bool
Desc: Check encoding legality. for varchar/char Only the target database is openGauss/MogDB GBK/GB18030 character set
Default: false
Option:
- true
- false
Add: v2.9.5