mysql - AWS DMS bool 列问题

标签 mysql amazon-web-services amazon-redshift amazon-rds aws-dms

我尝试使用 DMS 启用复制,使用 Aurora mySQL 实例作为源,使用 Redshift 实例作为目标。 bool 列上的复制失败。我已在 mySQL 实例上将 bool 列声明为 BIT(1)。 根据文档,mySQL 中的 bool 列应定义为 BIT:

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html#CHAP_Source.MySQL.DataTypes

如果我删除 bool 列,它就会起作用。我还尝试将该列定义为 bool 值。这也不起作用。

这是我收到的错误:

2018-08-26T16:59:19 [TARGET_APPLY ]E: RetCode: SQL_ERROR SqlState: 42804 NativeError: 30 Message: [Amazon][Amazon Redshift] (30) Error occurred while trying to execute a query: [SQLState 42804] ERROR: column "state" is of type boolean but expression is of type character varying, HINT: You will need to rewrite or cast the expression. [1022502] (ar_odbc_stmt.c:4428)

最佳答案

事实证明这是 DMS 的一个错误。这种情况仅在正在进行的复制期间发生,而不是在满负载时发生。在从 Aurora MySql 到 Redshift 的复制过程中, bool 值被转换为 Varchar,导致出现上述错误。

关于mysql - AWS DMS bool 列问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52028485/

相关文章:

amazon-web-services - Redshift 复制命令递归扫描

mysql - RoR 和 redmine 设置西里尔字母

php - 多次上传php脚本并存入mysql数据库

PHP Levenshtein 查询结果

amazon-web-services - 启用日志文件轮换到 s3

amazon-web-services - AWS Redshift -- 加载到 TIMESTAMP 字段

MySQL order by ... 奇怪的顺序

amazon-web-services - 如何在 CloudFormation 中启用 VirtualMFADevice?

amazon-web-services - 运行 EMR 示例,出现 301 错误

postgresql - 连接到 Redshift 时出现 SQL 工作台错误