Fortunately, the error can easily be avoided, though, by adding an extra parameter. The error message given is not exactly the clearest, and it may be very confusing. This can easily happen when an S3 bucket is created in a region different from the region your Redshift cluster is in. Some people may have trouble trying to copy their data from their own S3 buckets to a Redshift cluster. If you have any questions, let us know in the comments! How to load data from different s3 regions You can learn more about the exact usage here. If it is not, you need to let it know by using the FORMAT AS parameter. If the source file doesn’t naturally line up with the table’s columns, you can specify the column order by including a column list in your COPY command, like so: copy catdemo (column1, column2, etc.)ĪWS assumes that your source is a UTF-8, pipe delimited text file. Here’s a simple example that copies data from a text file in s3 to a table in Redshift: copy catdemoįrom 's3://awssampledbuswest2/tickit/category_pipe.txt' If the source file doesn’t naturally line up with the table’s columns, you can specify the column order by including a column list.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |