No release in over 3 years
Low commit activity in last 3 years
A filter plugin for Embulk to cast column type.
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
>= 10.0
 Project Readme

Typecast filter plugin for Embulk

Build Status

A filter plugin for Embulk to cast column type.

Configuration

  • columns: columns to retain (array of hash)
    • name: name of column (required)
    • type: embulk type to cast
    • format: specify the format of the timestamp (string, default is default_timestamp_format)
    • timezone: specify the timezone of the timestamp (string, default is default_timezone)
  • default_timestamp_format: default timestamp format (string, default is %Y-%m-%d %H:%M:%S.%N %z)
  • default_timezone: default timezone (string, default is UTC)
  • stop_on_invalid_record: stop bulk load transaction if a invalid record is found (boolean, default is false)

Example (How to Use)

See example.csv and example.yml.

JSONPath

For type: json column, you can specify JSONPath for column's name as:

name: $.payload.key1
name: "$.payload.array[0]"
name: "$.payload.array[*]"
name: $['payload']['key1.key2']

Following operators of JSONPath are not supported:

  • Multiple properties such as ['name','name']
  • Multiple array indexes such as [1,2]
  • Array slice such as [1:2]
  • Filter expression such as [?(<expression>)]

Development

Run example:

$ ./gradlew gem
$ embulk preview -I build/gemContents/lib example/example.yml

Run test:

$ ./gradlew test

Run checkstyle:

$ ./gradlew check

Release gem:

$ ./gradlew gem
$ gem push build/gems/embulk-filter-typecast-<version>.gem