{"id":27627193,"url":"https://github.com/treasure-data/embulk-parser-query_string","last_synced_at":"2025-04-23T13:53:28.280Z","repository":{"id":37588109,"uuid":"38602908","full_name":"treasure-data/embulk-parser-query_string","owner":"treasure-data","description":"Embulk parser plugin for URL-encoded key value pairs","archived":false,"fork":false,"pushed_at":"2022-06-21T23:27:56.000Z","size":147,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":95,"default_branch":"master","last_synced_at":"2025-03-30T15:17:30.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.embulk.org/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treasure-data.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2015-07-06T07:03:12.000Z","updated_at":"2022-06-21T23:27:59.000Z","dependencies_parsed_at":"2022-08-25T13:12:06.781Z","dependency_job_id":null,"html_url":"https://github.com/treasure-data/embulk-parser-query_string","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Fembulk-parser-query_string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Fembulk-parser-query_string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Fembulk-parser-query_string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treasure-data%2Fembulk-parser-query_string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treasure-data","download_url":"https://codeload.github.com/treasure-data/embulk-parser-query_string/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250444189,"owners_count":21431598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-23T13:53:27.610Z","updated_at":"2025-04-23T13:53:28.273Z","avatar_url":"https://github.com/treasure-data.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/treasure-data/embulk-parser-query_string.svg?branch=master)](https://travis-ci.org/treasure-data/embulk-parser-query_string)\n[![Code Climate](https://codeclimate.com/github/treasure-data/embulk-parser-query_string/badges/gpa.svg)](https://codeclimate.com/github/treasure-data/embulk-parser-query_string)\n[![Test Coverage](https://codeclimate.com/github/treasure-data/embulk-parser-query_string/badges/coverage.svg)](https://codeclimate.com/github/treasure-data/embulk-parser-query_string/coverage)\n\n# Query String parser plugin for [Embulk](http://www.embulk.org)\n\nTransform `key=value\u0026key2=value2` line to `{key: \"value\", key2: \"value2\"}`. (HTTP Query String to Hash)\n\nCurrently, this plugin supports minimum case, some edge cases are unsupported as below.\n\n- Duplicated key (e.g. `key=1\u0026key=2`)\n- Array parameter (e.g. `key[]=1\u0026key[]=2`)\n\n## Overview\n\nRequired Embulk version \u003e= 0.7.2.\n\n**NOTE: If you use Embulk \u003c 0.7, you should use embulk-parser-query_string \u003c= 0.1.3.**\n\n* **Plugin type**: parser\n* **Guess supported**: yes\n\n## Configuration\n\n- **strip_quote**: If you have quoted lines file such as `\"foo=FOO\u0026bar=BAR\"`, should be true for strip their quotes. (bool, default: true)\n- **strip_whitespace**: Strip whitespace before parsing lines for any indented line parse correctly such as '  foo=FOO'. (bool, default: true)\n- **capture**: Capture valuable text from each line using Regexp. Matched first pattern (a.k.a `$1`) will be used. See also [partial-config.yml](./partial-config.yml) (string, default: nil)\n\n## Example\n\nYou have such text file (`target_file.txt`) as below:\n\n```text\n\"user_id=42\u0026some_param=ABC\"\n\"user_id=43\u0026some_param=EFG\"\n\"user_id=44\u0026some_param=XYZ\"\n```\n\nAnd you have `partial-config.yml` as below:\n\n```yaml\nin:\n  type: file\n  path_prefix: ./target_file\n  parser:\n    strip_quote: true\n    strip_whitespace: true\nexec: {}\nout: {type: stdout}\n```\n\nRun `embulk guess`.\n\n```\n$ embulk guess -g query_string partial-config.yml -o guessed.yml\n```\n\nYou got guessed.yml as below:\n\n```yaml\nin:\n  type: file\n  path_prefix: ./target_file\n  parser:\n    strip_quote: true\n    strip_whitespace: true\n    charset: ISO-8859-2\n    newline: CRLF\n    type: query_string\n    columns:\n    - {name: user_id, type: long}\n    - {name: some_param, type: string}\nexec: {}\nout: {type: stdout}\n```\n\nFinally, `embulk run` with generated guessed.yml.\n\n```\n$ embulk run guessed.yml\n```\n\nYou can see the parsed records on STDOUT.\n\n## Install plugin\n\n```\n$ embulk gem install embulk-parser-query_string\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Fembulk-parser-query_string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreasure-data%2Fembulk-parser-query_string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreasure-data%2Fembulk-parser-query_string/lists"}