Giter VIP home page Giter VIP logo

embulk-output-key_to_redis's Introduction

Key To Redis output plugin for Embulk

Generate the aggregated key from input values and output to Redis's SET value.

This plugin is designed to extract data set diff files used with the combination in below use cases.

  1. Use this plugin and output specified key's to redis.
    • this plugin.
  2. Input another data source and use filter key_in_redis plugin with specified key's then filtered the key's (or that hash).

Overview

  • Plugin type: output
  • Load all or nothing: no
  • Resume supported: no
  • Cleanup supported: no

Configuration

name type required? default description
host string optional "127.0.0.1" redis servers host
port integer optional "6379" redis servers port
db integer optional "null" redis servers db
flush_on_start boolean optional "false" flush on start specified redis servers db
redis_set_key string required redis of key of set name
appender string optional "-" multi key of appender
put_as_md5 boolean optional "false" sadd the value to converted md5
key_with_index hash: Map<Int,String> required with key_with_index or json_key_with_index or only one index with key name
json_key_with_index hash: Map<Int,String> required with key_with_index or json_key_with_index or only one json columns's expanded key name
default_timezone string optional UTC
default_timestamp_format string optional %Y-%m-%d %H:%M:%S.%6N

Example

  • input json
{  
   "device_id":"ABC",
   "timestamp_micros":1502590079312009,
   "params":{  
      "UserID":"user_id_12345"
   }
}
  • definition's yaml
filters:
  - type: expand_json
    json_column_name: record
    root: "$."
    stop_on_invalid_record: false
    expanded_columns:
      - { name: "device_id", type: string }
      - { name: "timestamp_micros", type: long }
      - { name: "params", type: json }
out:
  type: "key_to_redis"
  redis_set_key: redis_key
  flush_on_start: true
  put_as_md5: false
  appender: "_"
  key_with_index: 
    1: "device_id"
    2: "timestamp_micros"
  json_key_with_index:
    3: "UserID" 
  • output as redis command
sadd redis_key "ABC_1502590079312009_user_id_12345"

Build

$ ./gradlew gem  # -t to watch change of files and rebuild continuously

embulk-output-key_to_redis's People

Contributors

smdmts avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.