当我们使用 Glue 将数据从 DocumentDb 转储到 Redshift 时,从 Redshift 获取字符串而不是数组

Posted

技术标签:

【中文标题】当我们使用 Glue 将数据从 DocumentDb 转储到 Redshift 时,从 Redshift 获取字符串而不是数组【英文标题】:Getting a String Instead of Array from Redshift while we dump data from DocumentDb to Redshift using Glue 【发布时间】:2021-11-24 08:35:07 【问题描述】:

我的数据在 documentdb 中有一个字符串数组。但是当我使用胶水转储到 Redshift 时,整个数组被视为一个字符串。我知道在 Redshift 中没有直接转换为数组的方法,但有没有其他方法可以做到这一点?

【问题讨论】:

【参考方案1】:

redshift 中没有数组数据类型。你唯一能做的就是explode数组在红移的路上。

【讨论】:

【参考方案2】:

您可以将数据存储为 json 列表的 Redshift“超级”数据类型。这对您的情况有帮助吗?

【讨论】:

以上是关于当我们使用 Glue 将数据从 DocumentDb 转储到 Redshift 时,从 Redshift 获取字符串而不是数组的主要内容,如果未能解决你的问题,请参考以下文章