{"action":"created","issue":{"url":"https://api.github.com/repos/hiroyuki-sato/embulk-parser-jsonpath/issues/15","repository_url":"https://api.github.com/repos/hiroyuki-sato/embulk-parser-jsonpath","labels_url":"https://api.github.com/repos/hiroyuki-sato/embulk-parser-jsonpath/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/hiroyuki-sato/embulk-parser-jsonpath/issues/15/comments","events_url":"https://api.github.com/repos/hiroyuki-sato/embulk-parser-jsonpath/issues/15/events","html_url":"https://github.com/hiroyuki-sato/embulk-parser-jsonpath/issues/15","id":255623521,"number":15,"title":"Cant use guess_sample_buffer_bytes?","user":{"login":"kieaiaarh","id":10335225,"avatar_url":"https://avatars3.githubusercontent.com/u/10335225?v=4","gravatar_id":"","url":"https://api.github.com/users/kieaiaarh","html_url":"https://github.com/kieaiaarh","followers_url":"https://api.github.com/users/kieaiaarh/followers","following_url":"https://api.github.com/users/kieaiaarh/following{/other_user}","gists_url":"https://api.github.com/users/kieaiaarh/gists{/gist_id}","starred_url":"https://api.github.com/users/kieaiaarh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kieaiaarh/subscriptions","organizations_url":"https://api.github.com/users/kieaiaarh/orgs","repos_url":"https://api.github.com/users/kieaiaarh/repos","events_url":"https://api.github.com/users/kieaiaarh/events{/privacy}","received_events_url":"https://api.github.com/users/kieaiaarh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-06T14:26:31Z","updated_at":"2017-09-07T05:26:18Z","closed_at":null,"author_association":"NONE","body":"--- \r\n* Embulk v0.8.31\r\n\r\n### Gemfile\r\n```gemfile\r\nsource 'https://rubygems.org'                                                                                                                                 \r\n\r\n# for input json\r\ngem 'embulk-parser-jsonpath', '~> 0.2.0'\r\n```\r\n---\r\nI just tried this for guess but not worked..\r\n```config.yml.liquid\r\nexec:                                                                                                                                                         \r\n  guess_sample_buffer_bytes: 136192\r\nin:\r\n  type: file\r\n  path_prefix: tmp/\r\nout:\r\n  type: stdout\r\n```\r\n\r\n`$ embulk guess -g jsonpath config.yml.liquid -o guess.yml`\r\n```\r\n2017-09-06 23:15:36.677 +0900: Embulk v0.8.31\r\n2017-09-06 23:16:00.086 +0900 [INFO] (0001:guess): Listing local files at directory 'tmp' filtering filename by prefix ''\r\n2017-09-06 23:16:00.087 +0900 [INFO] (0001:guess): \"follow_symlinks\" is set false. Note that symbolic links to directories are skipped.\r\n2017-09-06 23:16:00.092 +0900 [INFO] (0001:guess): Loading files [tmp/test.json]\r\n2017-09-06 23:16:00.099 +0900 [INFO] (0001:guess): Try to read 136,192 bytes from input source\r\n2017-09-06 23:16:00.145 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/gzip from a load path\r\n2017-09-06 23:16:00.157 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/bzip2 from a load path\r\n2017-09-06 23:16:00.169 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/json from a load path\r\n2017-09-06 23:16:00.174 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/csv from a load path\r\n2017-09-06 23:16:00.229 +0900 [INFO] (0001:guess): Loaded plugin embulk-parser-jsonpath (0.2.0)\r\norg.jruby.exceptions.RaiseException: (null) unexpected token at '{\r\n    \"date\": \"2017-08-06\",\r\n    \"clicks\": 0,\r\n    \"ctr\": 0,\r\n    \"impressions\": 2,\r\n    \"keyword\": \"hogehoge\",\r\n  '\r\n\tat RUBY.load(/Users/kieaiaarh/.embulk/jruby/2.3.0/gems/multi_json-1.12.2/lib/multi_json.rb:124)\r\n\tat RUBY.process_object(/Users/kieaiaarh/.embulk/jruby/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath.rb:87)\r\n\tat RUBY.enum_on(/Users/kieaiaarh/.embulk/jruby/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath.rb:73)\r\n\tat RUBY.on(/Users/kieaiaarh/.embulk/jruby/2.3.0/gems/jsonpath-0.5.8/lib/jsonpath.rb:65)\r\n\tat RUBY.guess_text(/Users/kieaiaarh/.embulk/jruby/2.3.0/gems/embulk-parser-jsonpath-0.2.0/lib/embulk/guess/jsonpath.rb:12)\r\n\tat RUBY.guess(uri:classloader:/embulk/guess_plugin.rb:78)\r\n\tat RUBY.guess(uri:classloader:/embulk/guess_plugin.rb:24)\r\n:\r\n```\r\n\r\nand I cut data , which is 32K because input json data is too large\r\n```\r\n$ ls -la tmp\r\n-rw-r--r--  1 kieaiaarh  staff    32K  9  6 23:18 tmp/test.json`\r\n```\r\n\r\nand its worked!\r\n```\r\nembulk guess -g jsonpath config.yml.liquid -o guess.yml\r\n2017-09-06 23:20:23.739 +0900: Embulk v0.8.31\r\n2017-09-06 23:20:46.922 +0900 [INFO] (0001:guess): Listing local files at directory 'tmp' filtering filename by prefix ''\r\n2017-09-06 23:20:46.923 +0900 [INFO] (0001:guess): \"follow_symlinks\" is set false. Note that symbolic links to directories are skipped.\r\n2017-09-06 23:20:46.928 +0900 [INFO] (0001:guess): Loading files [tmp/test.json]\r\n2017-09-06 23:20:46.935 +0900 [INFO] (0001:guess): Try to read 136,192 bytes from input source\r\n2017-09-06 23:20:46.981 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/gzip from a load path\r\n2017-09-06 23:20:46.991 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/bzip2 from a load path\r\n2017-09-06 23:20:47.003 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/json from a load path\r\n2017-09-06 23:20:47.008 +0900 [INFO] (0001:guess): Loaded plugin embulk/guess/csv from a load path\r\n2017-09-06 23:20:47.061 +0900 [INFO] (0001:guess): Loaded plugin embulk-parser-jsonpath (0.2.0)\r\nexec: {guess_sample_buffer_bytes: 136192}\r\nin:\r\n  type: file\r\n  path_prefix: tmp/\r\n  parser:\r\n    charset: UTF-8\r\n    newline: LF\r\n    type: jsonpath\r\n    delimiter: ','\r\n    quote: '\"'\r\n    escape: '\"'\r\n    trim_if_not_quoted: false\r\n    skip_header_lines: 2\r\n    allow_extra_columns: false\r\n    allow_optional_columns: false\r\n    columns:\r\n    - {name: date, type: timestamp, format: '%Y-%m-%d'}\r\n    - {name: clicks, type: long}\r\n    - {name: ctr, type: double}\r\n    - {name: impressions, type: long}\r\n    - {name: keyword, type: string}\r\n    - {name: position, type: double}\r\nout: {type: stdout}\r\n\r\nCreated 'guess.yml' file.\r\n```\r\n\r\nbut I cant understand ....\r\naccording to https://github.com/embulk/embulk/pull/609 \r\nIt seems that guess config(yml) can configure guess_sample_buffer_bytes...\r\n\r\nThanks ur help."},"comment":{"url":"https://api.github.com/repos/hiroyuki-sato/embulk-parser-jsonpath/issues/comments/327690163","html_url":"https://github.com/hiroyuki-sato/embulk-parser-jsonpath/issues/15#issuecomment-327690163","issue_url":"https://api.github.com/repos/hiroyuki-sato/embulk-parser-jsonpath/issues/15","id":327690163,"user":{"login":"hiroyuki-sato","id":767650,"avatar_url":"https://avatars0.githubusercontent.com/u/767650?v=4","gravatar_id":"","url":"https://api.github.com/users/hiroyuki-sato","html_url":"https://github.com/hiroyuki-sato","followers_url":"https://api.github.com/users/hiroyuki-sato/followers","following_url":"https://api.github.com/users/hiroyuki-sato/following{/other_user}","gists_url":"https://api.github.com/users/hiroyuki-sato/gists{/gist_id}","starred_url":"https://api.github.com/users/hiroyuki-sato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiroyuki-sato/subscriptions","organizations_url":"https://api.github.com/users/hiroyuki-sato/orgs","repos_url":"https://api.github.com/users/hiroyuki-sato/repos","events_url":"https://api.github.com/users/hiroyuki-sato/events{/privacy}","received_events_url":"https://api.github.com/users/hiroyuki-sato/received_events","type":"User","site_admin":false},"created_at":"2017-09-07T05:26:18Z","updated_at":"2017-09-07T05:26:18Z","author_association":"OWNER","body":"@kieaiaarh \r\nIt seems that the cause is embulk-core. \r\nI reported it. https://github.com/embulk/embulk/issues/788\r\n\r\nI'll let you know when the issue fix."}}
{"actor":{"display_login":"hiroyuki-sato"}}