Coder Social home page Coder Social logo

kettle-plugins-es-bulk-insert's Introduction

kettle-plugins-es-bulk-insert

support for elasticsearch 6.3.0

I have down kettle for version 8.1.0.1 and hacking for the [ elasticsearch bulk insert ] plugin for support the newest elasticsearch 6.3.0.

It works on Pentaho Data Intergation 7.0.0 .

I can not upload the final zip file because of github 25MB file size limit. So I post the compile proccess

  1. One must do some changing on the maven settings.xml accouding to url https://raw.githubusercontent.com/pentaho/maven-parent-poms/master/maven-support-files/settings.xml By the way,the pluginGroups tag in the settings.xml is deprecated for my maven 3.3.9,so just remove it.

  2. After importing my project ,run command: mvn clean package -Dmaven.test.skip
    you will get the zip file under the assemble directory after a long running time

  3. unzip the file. and copy the elasticsearch-bulk-insert-plugin to the kettle plugins directory

  4. elasticsearch 6.3.0 does not support the kettle BigNumber type.So if you encount the exception: "cannot write xcontent for unknown value of type for java.math.BigDecimal" you can adjust your field type in kettle according to the elastiseaech xcontent source code:

     private void unknownValue(Object value, boolean ensureNoSelfReferences) throws IOException {
       if (value == null) {
           nullValue();
           return;
       }
       Writer writer = WRITERS.get(value.getClass());
       if (writer != null) {
           writer.write(this, value);
       } else if (value instanceof Path) {
           //Path implements Iterable<Path> and causes endless recursion and a StackOverFlow if treated as an Iterable here
           value((Path) value);
       } else if (value instanceof Map) {
           @SuppressWarnings("unchecked")
           final Map<String, ?> valueMap = (Map<String, ?>) value;
           map(valueMap, ensureNoSelfReferences);
       } else if (value instanceof Iterable) {
           value((Iterable<?>) value, ensureNoSelfReferences);
       } else if (value instanceof Object[]) {
           values((Object[]) value, ensureNoSelfReferences);
       } else if (value instanceof ToXContent) {
           value((ToXContent) value);
       } else if (value instanceof Enum<?>) {
           // Write out the Enum toString
           value(Objects.toString(value));
       } else {
           throw new IllegalArgumentException("cannot write xcontent for unknown value of type " + value.getClass());
       }
    }

kettle-plugins-es-bulk-insert's People

Contributors

stanleyyang1987 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.