MogDB
Ecological Tools
Documentation:stable
Supported Versions:

mtk check-table-data

Check the table data for exception data.

Synopsis

Check the table data for exception data.

  1. date/datetime type contains zero data data

    • MySQL

      select * from table where (col_date >= '0000-00-00' and col_date < '0001-01-01')
  2. varchar/varchar2/char/text type contains char(0),chr(0),\0,0x00,x'00'

    • MySQL

      select * from table where (col_varchar like CONCAT('%', char(0),'%')
    • DB2

      select * from table where (col_varchar like '%'||x'00'||'%')
    • Oracle

      select * from table where (col_varchar like '%'||chr(0)||'%')
mtk check-table-data [flags]

Options

  -h, --help   help for check-table-data

Options inherited from parent commands

  -c, --config string          Set mtk config file. Support json,yaml. [env MTK_CONFIG] (default "mtk.json")
  -d, --debug                  Set the debug mode.
                               Not necessary for the normal usage. [env MTK_DEBUG]
      --disableIgnoreCase      Disables ignoring case queries
      --disableSelectPart      Disable the select by partition
      --file                   export to file
      --fileType string        Indicates the type of a file when data is to be exported to a file. csv,sql (default "csv")
      --noTerminalReport       The terminal does not print an overview of the migration report
      --path string            Indicates the directory of a file to which data is to be exported (default "./data")
      --preRun                 preRun check.
      --schemas string         the Migrate schema,Separated by commas.(schema1,schema2,db1)
      --seqLastNumAddNum int   The last value of the sequence is increased.
      --tables string          the Migrate tables,Separated by commas.(tab1,schema1.tab1)

SEE ALSO

  • mtk - Database Migration Toolkit