Skip to content
Last updated

File Decoder機能

Treasure Data Integrationには、gzipbzip2のDecoder pluginがあります。このpluginを使用して、圧縮されたSource dataファイルを使用できます。また、特定のIntegrationでは、single_file_in_zip Decoderを使用することもできます。

load.ymlの圧縮タイプに応じて、decodersセクションを追加してください。

  • gzip
in:
...
  decoders:
  - {type: gzip }
out:
...
  • bzip2
in:
...
  decoders:
  - {type: bzip2 }
out:
...

bzip2は、バイトシーケンスのみを圧縮する形式であり、複数のファイルを1つのファイルにアーカイブするものではありません。1つのシンプルなbzip2ファイルには、その定義上、1つのファイルのみを含む必要があります。

  • SFTP、FTP、Amazon S3専用のsingle_file_in_zip

SFTP/FTPおよびAmazon S3のIntegrationは、単一のzipファイル用のDecoderをサポートしています。CLI(TD Toolbelt)からSFTP/FTPまたはAmazon S3 Connectorを設定する場合は、設定ファイルに次の2行を追加してください。

in:
...
  decoders:
  - {type: single_file_in_zip }
out:
...