Redshift:创建外部表返回0行

问题描述 投票:0回答:1

我有一个位于s3:// myBucket /的文本文件test.txt,请参阅下面的示例,我想在Redshift中创建一个外部表。 当我从表中选择时,它返回0行。

1,One
2,Two
3,Three

create external table spectrum_schema.test(
Id integer,
Name varchar(255))
row format delimited
fields terminated by ','
stored as textfile
location 's3://myBucket/';

select * from spectrum_schema.test //returns 0 rows

有什么建议我可以解决这个问题吗?

amazon-web-services amazon-s3 amazon-redshift
1个回答
0
投票

我通过将文件移动到s3:// myBucket / test来修复此问题

© www.soinside.com 2019 - 2024. All rights reserved.