No commit activity in last 3 years
No release in over 3 years
Parses Variable Length Bytes files read by other file input plugins.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.0
~> 12.0
 Project Readme

Variable Length Bytes parser plugin for Embulk

Gem Version

Variable length bytes record parser plugin for Embulk.

Overview

  • Plugin type: parser
  • Guess supported: no

Install

$ embulk gem install embulk-parser-variable_length_bytes

Configuration

  • columns: Specify column name and type, range of bytes('<start>..<end>'). If the last column has a variable length, specify it as '<start>...'. (array, required)
  • record_separator: Hexadecimal representation of characters for record separator sequence (eg. 0x20) or new line character(CR, LF, CRLF). Set null to parse fixed-length records without record separator. (string, default: LF)
  • charset: Character encoding (eg. ISO-8859-1, UTF-8). (string, default: UTF-8)
  • stop_on_invalid_record: Stop bulk load transaction if a file includes invalid record. (boolean, default: false)

Example

in:
  type: any file input plugin type
  parser:
    type: variable_length_bytes
    charset: Shift_JIS
    record_separator: CRLF
    stop_on_invalid_record: true
    columns: 
    - {name: id, type: long, pos: '0..3'}
    - {name: name, type: string, pos: '3..11'}
    - {name: price, type: double, pos: '11..15'}
    - {name: flag, type: boolean, pos: '15..20'}
    - {name: description, type: string, pos: '20...'}

Build

$ ./gradlew gem