embulk-filter-hash 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8fdc91a6edf6af6d0ae1cb6f26bf5ed108e71c86
4
- data.tar.gz: bcd859b0a16583eebe241f78f83334f523be6fea
3
+ metadata.gz: 55e32c59aa1c3fc35b3ea853b56be1ade5eb7544
4
+ data.tar.gz: 543dbf94ee96d0b2d8c5df445c02e1c38c5df69c
5
5
  SHA512:
6
- metadata.gz: 5faf45e90d19c457183a1270332cedd66b9f26bf6f3aded46f0e840ef95017edce7c837912e12ee29c998ea4d2eb371ba52c742d260ee00c1f9c2b2856a0c61f
7
- data.tar.gz: c703dbccea0f95bb1d77d0d9d7a981a3bd6ac6c92784fda36157ca72390bca00fbd0fb3cdb0f7c8a78e01ddce3b087ad9ecdbf2651e8f4734ca2a706c2910860
6
+ metadata.gz: 00fed17b6821661a3d3770020e4f70c5d5340542d040bd2f18f46befe1d045a86af0f2942f1abec5477e5e48ca5e39215b8df5a8aabcebeffaaa6be1dbd5de41
7
+ data.tar.gz: 6863c2ac3fbf8111efc9945f4b6963cdefe1eec6e8dc2a759620e17913e2561af5366fb6ecd56e564346f63f59c0bf3a913aaf4f58f62a9ef62add4052a1b2d3
@@ -12,11 +12,11 @@ configurations {
12
12
  provided
13
13
  }
14
14
 
15
- version = "0.1.1"
15
+ version = "0.1.2"
16
16
 
17
17
  dependencies {
18
- compile "org.embulk:embulk-core:0.7.7"
19
- provided "org.embulk:embulk-core:0.7.7"
18
+ compile "org.embulk:embulk-core:0.8.8"
19
+ provided "org.embulk:embulk-core:0.8.8"
20
20
  // compile "YOUR_JAR_DEPENDENCY_GROUP:YOUR_JAR_DEPENDENCY_MODULE:YOUR_JAR_DEPENDENCY_VERSION"
21
21
  testCompile "junit:junit:4.+"
22
22
  }
@@ -0,0 +1,2 @@
1
+ id,name,json
2
+ 1,あ,{"a":{"b":"c"}}
@@ -2,10 +2,23 @@ package org.embulk.filter.hash;
2
2
 
3
3
  import com.google.common.base.Optional;
4
4
  import com.google.common.base.Throwables;
5
- import org.embulk.config.*;
6
- import org.embulk.spi.*;
5
+ import org.embulk.config.Config;
6
+ import org.embulk.config.ConfigDefault;
7
+ import org.embulk.config.ConfigSource;
8
+ import org.embulk.config.Task;
9
+ import org.embulk.config.TaskSource;
10
+ import org.embulk.spi.Column;
11
+ import org.embulk.spi.DataException;
12
+ import org.embulk.spi.Exec;
13
+ import org.embulk.spi.FilterPlugin;
14
+ import org.embulk.spi.Page;
15
+ import org.embulk.spi.PageBuilder;
16
+ import org.embulk.spi.PageOutput;
17
+ import org.embulk.spi.PageReader;
18
+ import org.embulk.spi.Schema;
7
19
  import org.embulk.spi.time.Timestamp;
8
20
  import org.embulk.spi.type.Types;
21
+ import org.msgpack.value.Value;
9
22
 
10
23
  import java.security.MessageDigest;
11
24
  import java.security.NoSuchAlgorithmException;
@@ -103,6 +116,10 @@ public class HashFilterPlugin implements FilterPlugin {
103
116
  final Timestamp value = reader.getTimestamp(inputColumn);
104
117
  inputValue = value;
105
118
  builder.setTimestamp(inputColumn, value);
119
+ } else if (Types.JSON.equals(inputColumn.getType())) {
120
+ final Value value = reader.getJson(inputColumn);
121
+ inputValue = value;
122
+ builder.setJson(inputColumn, value);
106
123
  } else {
107
124
  throw new DataException("Unexpected type:" + inputColumn.getType());
108
125
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-filter-hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinichi Ishimura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-17 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,9 +54,10 @@ files:
54
54
  - gradlew
55
55
  - gradlew.bat
56
56
  - lib/embulk/filter/hash.rb
57
+ - sample.csv
57
58
  - src/main/java/org/embulk/filter/hash/HashFilterPlugin.java
58
59
  - src/test/java/org/embulk/filter/hash/TestHashFilterPlugin.java
59
- - classpath/embulk-filter-hash-0.1.1.jar
60
+ - classpath/embulk-filter-hash-0.1.2.jar
60
61
  homepage: https://github.com/kamatama41/embulk-filter-hash
61
62
  licenses:
62
63
  - MIT