1回答
- 新しい順
- 投票が多い順
- コメントが多い順
0
【以下的回答经过翻译处理】 目前,Glue只支持UTF-8编码的文件[1]。如果传入UTF-16文件,则可能会遇到“内部服务异常”错误消息。最可行的方法是,在通过Glue Crawler之前,通过编程方式将utf-16文件转换为utf-8,以下是使用Python编程语言进行转换的例子:
Specify the file paths
input_file_path = 'input_file.txt' output_file_path = 'output_file.txt'
Open the input file with UTF-16 encoding
with open(input_file_path, 'r', encoding='utf-16') as input_file: # Read the content of the input file content = input_file.read()
Open the output file with UTF-8 encoding
with open(output_file_path, 'w', encoding='utf-8') as output_file: # Write the content to the output file output_file.write(content)
[1] - https://docs.aws.amazon.com/glue/latest/dg/components-key-concepts.html
関連するコンテンツ
- 質問済み 1年前
- 質問済み 9ヶ月前
- 質問済み 7ヶ月前
- AWS公式更新しました 2年前
- AWS公式更新しました 1年前
- AWS公式更新しました 3年前
- AWS公式更新しました 3年前