带有“^A”分隔符的 Redshift COPY 命令

Redshift COPY command with "^A" delimiter

我正在尝试使用 COPY 命令使用控件 A ("^A") 分隔文件加载到 redshift 中,我看到默认分隔符是竖线 (|),对于 CSV,它是逗号。

我无法提交使用 ^A 的方法,当我尝试使用 ^A\x01 执行 COPY 命令时,它会抛出以下消息。以前有人试过这个吗?文档说我们可以使用定界符,但没有关于使用 ^A 的线索。

Password: ERROR: COPY delimiter must be a single character

我在 redshift 和 Pig 中使用 '\001' 作为基于 ctrl+A 的字段分隔符。

示例:

copy redshiftinfo from 's3://mybucket/data/redshiftinfo.txt' 
credentials 'aws_access_key_id=<access-key-id>;aws_secret_access_key=<secret-access-key>' 
delimiter '\001'