“ CharacterSetSettings”的文档在哪里?

时间:2019-05-30 20:41:56

标签: amazon-web-services amazon-rds amazon-rds-aurora aws-dms

我正在使用AWS Database Migration Service(DMS)创建复制任务。我注意到TaskSettings JSON中有一个名为CharacterSetSettings的属性。但是,似乎没有有关此属性的文档。

我尝试在文档和Google中搜索该属性,但没有出现。

任务设置JSON:

{
    "TargetMetadata": {
        "TargetSchema": "",
        "SupportLobs": true,
        "FullLobMode": false,
        "LobChunkSize": 0,
        "LimitedSizeLobMode": true,
        "LobMaxSize": 256,
        "InlineLobMaxSize": 0,
        "LoadMaxFileSize": 0,
        "ParallelLoadThreads": 0,
        "ParallelLoadBufferSize": 0,
        "BatchApplyEnabled": false,
        "TaskRecoveryTableEnabled": false
    },
    "FullLoadSettings": {
        "TargetTablePrepMode": "TRUNCATE_BEFORE_LOAD",
        "CreatePkAfterFullLoad": false,
        "StopTaskCachedChangesApplied": false,
        "StopTaskCachedChangesNotApplied": false,
        "MaxFullLoadSubTasks": 8,
        "TransactionConsistencyTimeout": 1000,
        "CommitRate": 10000
    },
    "Logging": {
        "EnableLogging": true,
        "LogComponents": [
            {
                "Id": "SOURCE_UNLOAD",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TARGET_LOAD",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "SOURCE_CAPTURE",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TARGET_APPLY",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            },
            {
                "Id": "TASK_MANAGER",
                "Severity": "LOGGER_SEVERITY_DEFAULT"
            }
        ],
        "CloudWatchLogGroup": "dms-tasks-altitude-staging-to-prod-instance",
        "CloudWatchLogStream": "dms-task-RU2FBO6SGUASAODLXHJ63OYDAM"
    },
    "ControlTablesSettings": {
        "historyTimeslotInMinutes": 5,
        "ControlSchema": "control",
        "HistoryTimeslotInMinutes": 5,
        "HistoryTableEnabled": true,
        "SuspendedTablesTableEnabled": true,
        "StatusTableEnabled": true
    },
    "StreamBufferSettings": {
        "StreamBufferCount": 3,
        "StreamBufferSizeInMB": 8,
        "CtrlStreamBufferSizeInMB": 5
    },
    "ChangeProcessingDdlHandlingPolicy": {
        "HandleSourceTableDropped": true,
        "HandleSourceTableTruncated": true,
        "HandleSourceTableAltered": true
    },
    "ErrorBehavior": {
        "DataErrorPolicy": "LOG_ERROR",
        "DataTruncationErrorPolicy": "LOG_ERROR",
        "DataErrorEscalationPolicy": "SUSPEND_TABLE",
        "DataErrorEscalationCount": 0,
        "TableErrorPolicy": "SUSPEND_TABLE",
        "TableErrorEscalationPolicy": "STOP_TASK",
        "TableErrorEscalationCount": 0,
        "RecoverableErrorCount": -1,
        "RecoverableErrorInterval": 5,
        "RecoverableErrorThrottling": true,
        "RecoverableErrorThrottlingMax": 1800,
        "ApplyErrorDeletePolicy": "IGNORE_RECORD",
        "ApplyErrorInsertPolicy": "LOG_ERROR",
        "ApplyErrorUpdatePolicy": "LOG_ERROR",
        "ApplyErrorEscalationPolicy": "LOG_ERROR",
        "ApplyErrorEscalationCount": 0,
        "ApplyErrorFailOnTruncationDdl": false,
        "FullLoadIgnoreConflicts": true,
        "FailOnTransactionConsistencyBreached": false,
        "FailOnNoTablesCaptured": false
    },
    "ChangeProcessingTuning": {
        "BatchApplyPreserveTransaction": true,
        "BatchApplyTimeoutMin": 1,
        "BatchApplyTimeoutMax": 30,
        "BatchApplyMemoryLimit": 500,
        "BatchSplitSize": 0,
        "MinTransactionSize": 1000,
        "CommitTimeout": 1,
        "MemoryLimitTotal": 1024,
        "MemoryKeepTime": 60,
        "StatementCacheSize": 50
    },
    "ValidationSettings": {
        "EnableValidation": true,
        "ValidationMode": "ROW_LEVEL",
        "ThreadCount": 5,
        "PartitionSize": 10000,
        "FailureMaxCount": 10000,
        "RecordFailureDelayInMinutes": 5,
        "RecordSuspendDelayInMinutes": 30,
        "MaxKeyColumnSize": 8096,
        "TableFailureMaxCount": 1000,
        "ValidationOnly": false,
        "HandleCollationDiff": false,
        "RecordFailureDelayLimitInMinutes": 0
    },
    "PostProcessingRules": null,
    "CharacterSetSettings": null
}

CharacterSetSettings上应该有文档。我希望文档会在Specifying Task Settings for AWS Database Migration Service Tasks - AWS Database Migration Service上列出。

1 个答案:

答案 0 :(得分:0)

您正在搜索Character Substitution Task Settings。这似乎是很新的。

您可以指定复制任务执行字符 目标数据库上所有源数据库列的替换 使用AWS DMS STRINGWSTRING数据类型。您可以配置 具有以下端点的任何任务的字符替换 源数据库和目标数据库:

源数据库:

  • Oracle
  • Microsoft SQL Server
  • MySQL
  • PostgreSQL
  • SAP Adaptive Server Enterprise(ASE)
  • IBM Db2 LUW

目标数据库:

  • Oracle
  • Microsoft SQL Server
  • MySQL
  • PostgreSQL
  • SAP Adaptive Server Enterprise(ASE)
  • Amazon Redshift

在开始通过表映射指定的任何全局或表级转换之前,复制任务会完成所有指定的字符替换。

对象看起来像这样:

"CharacterSetSettings": {
    "CharacterReplacements": [ {
        "SourceCharacterCodePoint": int,
        "TargetCharacterCodePoint": int
        },
        [...]
    ],
    "CharacterSetSupport": {
        "CharacterSet": str,
        "ReplaceWithCharacterCodePoint": int
    }
}

DMS分两个阶段处理字符替换:

  • 在第一阶段,CharacterReplacements是一个对象列表,描述了一个Unicode代码点与另一个Unicode代码点的一次替换。例如,如果要将b替换为a,请将SourceCharacterCodePoint设置为62,将TargetCharacterCodePoint设置为61
  • 在第二阶段,设置CharacterSetSupport使DMS验证所有字符对于CharacterSet(即UTF-8UTF-16ISO-8859-1)都是有效的。文档中的完整列表)编码。如果发现无效字符,它们将被ReplaceWithCharacterCodePoint替换。

对于两个阶段,都可以使用特殊代码点0来删除字符。