embulk-parser-none 0.1.0 → 0.2.0

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: f858494eac26b9d93d8882a5caca43d2fdefa37e
4
- data.tar.gz: aa3773200f0c040d5ecd26c327591f0d045f2ac6
3
+ metadata.gz: f2a6433aa02f99f9554a850e1fcec087939c1179
4
+ data.tar.gz: 1223f3f2db887407f2d3bc85deb88f1420e2e144
5
5
  SHA512:
6
- metadata.gz: bd43d053195ad43375f079a593f8569273aec04fbcf3fb25672931250205ed505deabdd64c0a488fac6606816f6d5d79e316755d721dbcb0f6b12c3bfae27c13
7
- data.tar.gz: f841f017bcd6579bbfb53a5c33bcdc3ebb7e7ec747182b55432a5b61c6c42f4913e2251a66491070811dcd900a6768de461778867e0768348ced0057231bd0dc
6
+ metadata.gz: 04a4996c216196c7a3179402f2ca544073498b85fd385a29d330df89e57ee8df4f5a48c1b44efcfd60cbb75fc0d7cb10ecda50538e673d48cef3b08c7692a9e6
7
+ data.tar.gz: 30055a20f014a87621ea0558687c3fb08e6e61ceb8f1940a109d074487e8f241aabd9a03148ff9082cc7b48ff5ff91c124a51f9a27e2fa0073eb9256275dadeb
@@ -1,3 +1,11 @@
1
+ # 0.2.0 (2016-02-22)
2
+
3
+ Incompatible changes:
4
+
5
+ * Rename mesasge\_key option to column\_name option
6
+ * Also, change the default value from `message` to `payload`
7
+
1
8
  # 0.1.0 (2015-10-27)
2
9
 
3
10
  first version
11
+
data/README.md CHANGED
@@ -15,7 +15,7 @@ $ embulk gem install embulk-parser-none
15
15
 
16
16
  ## Configuration
17
17
 
18
- - **message_key**: A column name which this plugin outputs (string, default: "message")
18
+ - **column_name**: A column name which this plugin outputs (string, default: "payload")
19
19
 
20
20
  ## Example
21
21
 
@@ -24,9 +24,8 @@ in:
24
24
  type: file
25
25
  path_prefix: example.txt
26
26
  parser:
27
- type: parser
28
- format: none
29
- message_key: message
27
+ type: none
28
+ column_name: payload
30
29
  ```
31
30
 
32
31
  Assume the input file (example.txt) is as following:
@@ -40,14 +39,26 @@ then this plugin treats as:
40
39
 
41
40
  ```
42
41
  +----------------+
43
- | message:string |
42
+ | payload:string |
44
43
  +----------------+
45
44
  | foo bar baz |
46
45
  | foo bar baz |
47
46
  +----------------+
48
47
  ```
49
48
 
50
- To resover a file, you may use csv formatter as:
49
+ To recover a file, you may use [embulk-formatter-single_value](https://github.com/sonots/embulk-formatter-single_value) as:
50
+
51
+ ```
52
+ out:
53
+ type: file
54
+ path_prefix: example.txt
55
+ sequence_format: ""
56
+ file_ext: .out
57
+ formatter:
58
+ type: single_value
59
+ ```
60
+
61
+ or csv formatter as:
51
62
 
52
63
  ```
53
64
  out:
@@ -57,7 +68,9 @@ out:
57
68
  file_ext: .out
58
69
  formatter:
59
70
  type: csv
71
+ delimiter: 0
60
72
  quote_policy: NONE
73
+ header_line: false
61
74
  ```
62
75
 
63
76
  ## ChangeLOG
@@ -69,6 +82,7 @@ out:
69
82
  Run example:
70
83
 
71
84
  ```
85
+ $ embulk gem install embulk-formatter-single_value
72
86
  $ ./gradlew classpath
73
87
  $ embulk run -I lib example.yml
74
88
  ```
@@ -12,7 +12,7 @@ configurations {
12
12
  provided
13
13
  }
14
14
 
15
- version = "0.1.0"
15
+ version = "0.2.0"
16
16
 
17
17
  dependencies {
18
18
  compile "org.embulk:embulk-core:0.6.18"
@@ -3,12 +3,11 @@ in:
3
3
  path_prefix: example.txt
4
4
  parser:
5
5
  type: none
6
- message_key: message
6
+ column_name: payload
7
7
  out:
8
8
  type: file
9
9
  path_prefix: example.txt
10
10
  sequence_format: ""
11
11
  file_ext: .out
12
12
  formatter:
13
- type: csv
14
- quote_policy: NONE
13
+ type: single_value
@@ -33,9 +33,9 @@ public class NoneParserPlugin
33
33
  public interface PluginTask
34
34
  extends Task, LineDecoder.DecoderTask //, TimestampParser.Task
35
35
  {
36
- @Config("message_key")
37
- @ConfigDefault("\"message\"")
38
- public String getMessageKey();
36
+ @Config("column_name")
37
+ @ConfigDefault("\"payload\"")
38
+ public String getColumnName();
39
39
  }
40
40
 
41
41
  @Override
@@ -43,9 +43,9 @@ public class NoneParserPlugin
43
43
  {
44
44
  PluginTask task = config.loadConfig(PluginTask.class);
45
45
  ArrayList<ColumnConfig> columns = new ArrayList<ColumnConfig>();
46
- final String messageKey = task.getMessageKey();
46
+ final String columnName = task.getColumnName();
47
47
 
48
- columns.add(new ColumnConfig(messageKey, STRING ,config));
48
+ columns.add(new ColumnConfig(columnName, STRING ,config));
49
49
 
50
50
  Schema schema = new SchemaConfig(columns).toSchema();
51
51
  control.run(task.dump(), schema);
@@ -59,7 +59,7 @@ public class NoneParserPlugin
59
59
  LineDecoder lineDecoder = new LineDecoder(input,task);
60
60
  PageBuilder pageBuilder = new PageBuilder(Exec.getBufferAllocator(), schema, output);
61
61
  String line = null;
62
- final String messageKey = task.getMessageKey();
62
+ final String columnName = task.getColumnName();
63
63
 
64
64
  while( input.nextFile() ){
65
65
  while(true){
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-parser-none
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-27 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,7 +60,7 @@ files:
60
60
  - lib/embulk/parser/none.rb
61
61
  - src/main/java/org/embulk/parser/NoneParserPlugin.java
62
62
  - src/test/java/org/embulk/parser/TestNoneParserPlugin.java
63
- - classpath/embulk-parser-none-0.1.0.jar
63
+ - classpath/embulk-parser-none-0.2.0.jar
64
64
  homepage: https://github.com/sonots/embulk-parser-none
65
65
  licenses:
66
66
  - MIT