【问题标题】:Copy data from S3 file into aws postgresql: invalid argument?将数据从 S3 文件复制到 aws postgresql:参数无效?
【发布时间】:2019-01-31 12:04:07
【问题描述】:

我正在尝试将 AWS S3 文件的内容复制到 AWS RDS Postgresql 表中,但我的语法似乎有误?

复制 myschema.mytable FROM 'S3://bucket-name/file_name.csv'(格式 CSV,分隔符 E'\t',编码'utf-8');

返回以下错误:ERROR: could not open file "S3://bucket-name/file_name.csv" for reading: Invalid argument

知道我做错了什么吗?

【问题讨论】:

    标签: postgresql amazon-web-services amazon-s3 amazon-rds


    【解决方案1】:

    Postgresql COPY command 不支持从 S3 复制数据。您需要使用中间服务从 S3 下载数据,然后将它们上传到数据库。

    这个文档会帮助你https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Procedural.Importing.html

    本教程展示了如何使用 Data Pipeline 在 S3 和 RDS MySQL 之间移动数据。 Postgress 应该非常相似。 https://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-template-copys3tords.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-26
      • 2019-04-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-19
      • 2019-03-30
      • 2019-05-22
      • 1970-01-01
      相关资源
      最近更新 更多