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 +4 -4
- data/build.gradle +3 -3
- data/sample.csv +2 -0
- data/src/main/java/org/embulk/filter/hash/HashFilterPlugin.java +19 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55e32c59aa1c3fc35b3ea853b56be1ade5eb7544
|
4
|
+
data.tar.gz: 543dbf94ee96d0b2d8c5df445c02e1c38c5df69c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00fed17b6821661a3d3770020e4f70c5d5340542d040bd2f18f46befe1d045a86af0f2942f1abec5477e5e48ca5e39215b8df5a8aabcebeffaaa6be1dbd5de41
|
7
|
+
data.tar.gz: 6863c2ac3fbf8111efc9945f4b6963cdefe1eec6e8dc2a759620e17913e2561af5366fb6ecd56e564346f63f59c0bf3a913aaf4f58f62a9ef62add4052a1b2d3
|
data/build.gradle
CHANGED
@@ -12,11 +12,11 @@ configurations {
|
|
12
12
|
provided
|
13
13
|
}
|
14
14
|
|
15
|
-
version = "0.1.
|
15
|
+
version = "0.1.2"
|
16
16
|
|
17
17
|
dependencies {
|
18
|
-
compile "org.embulk:embulk-core:0.
|
19
|
-
provided "org.embulk:embulk-core:0.
|
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
|
}
|
data/sample.csv
ADDED
@@ -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.
|
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.
|
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:
|
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.
|
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
|