简体   繁体   English

在Amazon Redshift Spectrum中加载外部表时如何跳过最后几条记录?

[英]How to skip end few records when loading external table in Amazon Redshift Spectrum?

My file has text at the end. 我的文件末尾有文字。

While creating external table I'm loading file from S3 and which I don't want to load in my table. 创建外部表时,我正在从S3加载文件,而我不想在我的表中加载该文件。

How to skip that text from the end? 如何从末尾跳过该文本?

You cannot explicitly skip rows at the end but you can allow a certain number of errors with the MAXERROR parameter. 您不能在末尾显式跳过行,但可以使用MAXERROR参数允许一定数量的错误。 Should be able to set that to ( number of lines to skip * number of files to be loaded ). 应该能够将其设置为( number of lines to skip * number of files to be loaded )。

https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-data-load.html#copy-maxerror https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-data-load.html#copy-maxerror

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Redshift Spectrum-如何在外部表中获取s3文件名 - AWS Redshift Spectrum - how to get the s3 filenames in the external table 如何为Redshift频谱中的嵌套Parquet类型创建外部表 - How to create an external table for nested Parquet type in redshift spectrum Redshift Spectrum - 在 CTE 中引用外部表? - Redshift Spectrum - Referencing an external table in a CTE? Redshift Spectrum中表名有连字符时如何查询表? - How to query table when table name has hyphen in Redshift Spectrum? 红移光谱 - 更新外部光谱表列类型 - Redshift spectrum - Updating external spectrum table column type 如何显示 Redshift Spectrum(外部架构)GRANTS? - How to show Redshift Spectrum (external schema) GRANTS? 将数据加载到 Amazon Redshift Spectrum 时删除双引号 " - Remove double quotes " while loading data to Amazon Redshift Spectrum 如何在红移光谱表中加载正确的数据? - How to load correct data in redshift spectrum table? 您如何通过 AWS Quicksight 连接到 Redshift Spectrum 上的外部架构/表? - How do you connect to an external schema/table on Redshift Spectrum through AWS Quicksight? 使用胶水数据目录中定义的外部表红移光谱 - Use external table redshift spectrum defined in glue data catalog
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM