{"id":19877541,"url":"https://github.com/yuokada/embulk-input-randomj","last_synced_at":"2025-07-26T20:05:47.587Z","repository":{"id":57788581,"uuid":"96459785","full_name":"yuokada/embulk-input-randomj","owner":"yuokada","description":"Embulk plugin for generating dummy records by Java.","archived":false,"fork":false,"pushed_at":"2025-04-23T07:01:59.000Z","size":481,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T08:19:48.613Z","etag":null,"topics":["embulk","embulk-input-plugin","embulk-plugin","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuokada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-06T18:21:15.000Z","updated_at":"2025-04-23T07:02:01.000Z","dependencies_parsed_at":"2023-10-01T18:52:57.735Z","dependency_job_id":"fd99d7e2-6186-4876-ac3f-255bdeed2422","html_url":"https://github.com/yuokada/embulk-input-randomj","commit_stats":{"total_commits":110,"total_committers":5,"mean_commits":22.0,"dds":"0.30000000000000004","last_synced_commit":"a4de2185b68ee9ae5261f6c8bc2c4026fbc099c9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuokada%2Fembulk-input-randomj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuokada%2Fembulk-input-randomj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuokada%2Fembulk-input-randomj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuokada%2Fembulk-input-randomj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuokada","download_url":"https://codeload.github.com/yuokada/embulk-input-randomj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252038097,"owners_count":21684624,"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":["embulk","embulk-input-plugin","embulk-plugin","java"],"created_at":"2024-11-12T16:37:43.173Z","updated_at":"2025-05-02T12:30:49.730Z","avatar_url":"https://github.com/yuokada.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Randomj input plugin for Embulk\n\n[![Gem Version](https://badge.fury.io/rb/embulk-input-randomj.svg)](https://badge.fury.io/rb/embulk-input-randomj)\n[![Build Status](https://github.com/yuokada/embulk-input-randomj/workflows/Java%20CI/badge.svg)](https://github.com/yuokada/embulk-input-randomj/actions)\n\nEmbulk plugin for dummy records generation written in Java.\n\nOriginal: [kumagi/embulk\\-input\\-random](https://github.com/kumagi/embulk-input-random)\n\n## Overview\n\n* **Plugin type**: input\n* **Resume supported**: no\n* **Cleanup supported**: no\n* **Guess supported**: no\n\n## Install\n\n``` shell\n% embulk gem install embulk-input-randomj\n```\n\n## Configuration\n\n- **rows**: Generate rows per thread (integer, required)\n- **threads**: Thread number (integer, default: `1`)\n- **primary_key**: Sequential ID column (string, default: `\"\"\"`)\n- **schema**: Schema infomation (list, required)\n\n## Example\n\n```yaml\nin:\n    type: randomj\n    rows: 16\n    threads: 1\n    primary_key: myid\n    schema:\n      - {name: myid,     type: long}\n      - {name: named,    type: string}\n      - {name: flag,     type: boolean}\n      - {name: pit_rate, type: double}\n      - {name: score,    type: long}\n      - {name: time,     type: timestamp, format: '%Y-%m-%d %H:%M:%S'}\n      - {name: purchase, type: timestamp, format: '%Y/%m/%d'}\n```\n\n- Add `length`, `max_value`, `min_value` option (from 0.3.0)\n- Add `null_rate` option (from 0.4.0)\n  This configuration is that inserted `null` into `price` filed with a probability `8` of 10000.\n- Support json type (from 0.5.0)\n  Experimental Feature\n- Support `start_date` \u0026 `end_date` key in **Timestamp** field.\n\n    - Ex1. `{name: created_at, type: timestamp, format: '%Y-%m-%d %H:%M:%S', start_date: 20180331, end_date: 20180430}`\n    - Ex2. `{name: created_at, type: timestamp, format: '%Y-%m-%d %H:%M:%S', start_date: 20180331}`\n\n```yaml\nin:\n    type: randomj\n    rows: 16\n    threads: 1\n    primary_key: myid\n    schema:\n      - {name: myid,     type: long}\n      - {name: named,    type: string, length: 12}\n      - {name: price,    type: long, max_value: 1080, min_value: 100, null_rate: 8}\n      - {name: purchase, type: timestamp, format: '%Y/%m/%d'}\n      - {name: json_key, type: json, schema: '[{\"name\": \"baz\", \"type\": \"array\", \"items\": {\"type\": \"string\", \"size\": 1}}]' }\n```\n\n\n## Usage\n\n### Example1\n\n```shell\n\n% cat example/config.yml\n  in:\n    type: randomj\n    rows: 16\n    threads: 1\n    # default_timezone: Asia/Tokyo\n    primary_key: myid\n    schema:\n      - {name: myid,     type: long}\n      - {name: named,    type: string}\n      - {name: x_flag,   type: boolean}\n      - {name: pit_rate, type: double}\n      - {name: score,    type: long}\n      - {name: time,     type: timestamp, format: '%Y-%m-%d %H:%M:%S'}\n      - {name: purchase, type: timestamp, format: '%Y/%m/%d'}\n\n  out:\n    type: stdout\n\n\n% embulk run -I lib example/config.yml\n2017-07-09 15:46:41.895 +0900: Embulk v0.8.25\n2017-07-09 15:46:55.699 +0900 [INFO] (0001:transaction): Loaded plugin embulk/input/randomj from a load path\n2017-07-09 15:46:55.781 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=8 / output tasks 4 = input tasks 1 * 4\n2017-07-09 15:46:55.801 +0900 [INFO] (0001:transaction): {done:  0 / 1, running: 0}\n1,01mtx0RqBzw6wAWhIC1T8AnqppmQZdHl,true,9146.666957486106,5317,2017-08-14 00:59:43,2017/09/25\n2,shGNGPfzZpyK9M2io2869LyMcw0pBOKq,true,4752.870731927854,8292,2017-09-12 02:31:04,2017/09/16\n3,n5E8DCtCV2U3VzLhycdFgzNdLXcitXqx,false,5694.8421878399195,5604,2017-08-20 18:24:12,2017/09/29\n4,soNWkF9sJryYje6Ah8WQ3E54rFhyptB7,true,2806.659132152377,7562,2017-09-13 03:38:13,2017/10/24\n5,1a368i7mvl7c3Vfvg9S2dsrMivRK53Ag,false,3341.138399030519,1037,2017-10-12 04:38:38,2017/08/16\n6,qwRsXYZcoVXA6DWPL40s7yybKQSM9tRQ,true,5250.281769589405,6277,2017-08-28 14:09:45,2017/08/15\n7,AA6IaC9PU5d99l4hB0WjFvMMbHKa7j59,false,3431.3913221943226,6323,2017-09-07 13:40:42,2017/08/05\n8,8ZCyzMgkx40yVqjVGBVsMkYuDoHRMmC7,true,2610.1924803136876,2548,2017-09-23 03:40:19,2017/07/14\n9,S7T1Gyk7EupPEJAYAXCsqsR1KDy7uiyD,true,5285.107346872876,904,2017-08-31 20:47:02,2017/09/10\n10,tGZJcz0uX7mnK2epBQGI1Uk2aGgJbK9w,false,9707.376365026039,5968,2017-08-31 21:27:20,2017/09/08\n11,mEAnKKnyIaxrtUp0krjq18RMfMTlM2dB,true,7709.450184794057,4111,2017-08-29 16:35:22,2017/07/23\n12,0ia5zVdwuPESDhI42ekDvvKNe1yxbwZG,true,6126.236771655601,3195,2017-10-08 19:21:30,2017/09/09\n13,jOMm4H3S02vIc5bNAbwVxZs1TQjuBUeF,true,6000.891404245845,5257,2017-07-09 07:49:29,2017/08/22\n14,o4T88GGY6qPzKSg9u2fdIGovYG3ssnj5,false,3640.521742574272,3756,2017-09-03 03:24:29,2017/10/05\n15,mr7T7kTsTRo6SitrkJG5iVB2sf4jC8Pr,false,4838.126961869101,5924,2017-08-17 09:18:16,2017/10/18\n16,oO0Eop9zzapIOunoSgrwV6eRgdVbwPiv,false,6363.525095467271,936,2017-10-12 04:07:29,2017/09/03\n2017-07-09 15:46:55.994 +0900 [INFO] (0001:transaction): {done:  1 / 1, running: 0}\n2017-07-09 15:46:56.030 +0900 [INFO] (main): Committed.\n2017-07-09 15:46:56.031 +0900 [INFO] (main): Next config diff: {\"in\":{},\"out\":{}}\n\n```\n\n### Example2\n\n- `named_s` return string with length 8\n- `score` return value between `100~255`\n- `rate` return value between `-100~100`\n\n```shell\n\n% cat example/config.yml\nin:\n    type: randomj\n    rows: 16\n    threads: 1\n    # default_timezone: Asia/Tokyo\n    primary_key: myid\n    schema:\n      - {name: myid,     type: long}\n      - {name: named,    type: string}\n      - {name: named_s,  type: string, length: 8}\n      - {name: x_flag,   type: boolean}\n      - {name: rate,     type: double, max_value: 100, min_value: -100}\n      - {name: score,    type: long, max_value: 255, min_value: 100}\n      - {name: time,     type: timestamp, format: '%Y-%m-%d %H:%M:%S'}\n      - {name: purchase, type: timestamp, format: '%Y/%m/%d'}\n\n  out:\n    type: stdout\n\n\n% embulk run -I lib example/config.yml\n2017-09-10 04:45:04.894 +0900: Embulk v0.8.32\n2017-09-10 04:45:10.212 +0900 [INFO] (0001:transaction): Loaded plugin embulk/input/randomj from a load path\n2017-09-10 04:45:10.246 +0900 [INFO] (0001:transaction): Using local thread executor with max_threads=8 / output tasks 4 = input tasks 1 * 4\n2017-09-10 04:45:10.263 +0900 [INFO] (0001:transaction): {done:  0 / 1, running: 0}\n1,BOcbVJX5bWL5wRBJc532trxvwhQpmg3d,yHwXATfG,true,-79.62544211154894,129,2017-12-05 22:31:35,2017/12/26\n2,N2gljQxd4yDBzJjK9iSRUdROtaZGUEl7,zSrEMjzC,false,-11.47506884041689,194,2017-09-17 15:56:18,2017/12/06\n3,PJvKkf0wwpGqGMlc7OjUhjZNi0pTEZIU,q6TgdoaZ,false,85.17356188437738,137,2017-10-07 17:28:43,2017/10/22\n4,DA6wWE4p3zIPDK0Mp81bWczewNSMY2sq,KeobJmS1,false,79.95787440150436,221,2017-09-28 19:35:17,2017/11/20\n5,8DNF4TzhVDLCFey2x1eCHryf4GdvHlyW,D2jddtEN,true,19.801687906161735,182,2017-11-24 18:43:38,2017/12/29\n6,veyIxBc9u0FMwsGksMfLhvBMuIF2D7XO,6Mtz4MN9,true,26.922649237294582,176,2017-09-23 07:43:40,2017/11/18\n7,HHCTLuaxAJIRHHG7cB2u9Ake9p9OSIcy,UHHKp5xX,true,9.960707451320626,108,2017-09-14 08:11:49,2017/11/05\n8,HcQhHMQ4sYiXTBpvNiTqDGskuTeVEC6r,d0VSR8K8,false,-62.405292711551624,118,2017-11-11 08:06:20,2017/10/20\n9,si5BWUPEEvVHvveeqSxG6ypc7pSsKtC7,bW5p9boG,false,-76.91915279000274,192,2017-09-28 19:46:53,2017/11/04\n10,xnfU0aJgigJG9rPan2rwoffhN9pzLQCy,R8MV0Jpa,true,-79.40738909989871,104,2017-11-19 02:50:07,2017/09/11\n11,KiRzQqfE6wRw3WjMPAmedqtHyG3MttGU,SowzDTSb,true,77.22509797548325,163,2017-12-23 18:16:30,2017/12/27\n12,pQLz3fMIkN6UANwSbzJ5vhBWzF2FI7uo,uPGyHyuW,true,71.19680005107371,180,2017-11-23 16:31:30,2017/11/14\n13,aFOc2qCAu5oYbxTCGkMNcZob6Tl3wl3Y,apFu34Ps,false,82.8406608691031,226,2017-10-03 06:09:25,2017/10/06\n14,Kz3JGL23k7f8SR17xQBw063ApuGdeWIP,r0c0KnUC,true,-26.484829732050134,113,2017-10-01 02:40:37,2017/11/26\n15,p5vGY02BzrHqk345JyAhFU7xVsA2jEZD,nhzsefns,false,-79.0184308849151,119,2017-12-15 22:59:28,2017/11/25\n16,1jyxot60lCrRFMUfjyHcZ07dq05eu76a,WewnLZfw,false,-55.315211168770816,141,2017-12-11 10:36:46,2017/12/05\n2017-09-10 04:45:10.344 +0900 [INFO] (0001:transaction): {done:  1 / 1, running: 0}\n2017-09-10 04:45:10.351 +0900 [INFO] (main): Committed.\n2017-09-10 04:45:10.351 +0900 [INFO] (main): Next config diff: {\"in\":{},\"out\":{}}\n\n```\n\n## Build\n\nTBD\n```\n$ ./gradlew gem  # -t to watch change of files and rebuild continuously\n```\n\n```\n$ ./gradlew build \u0026\u0026 ./gradlew classpath\n$ embulk run -I lib config/example.yml\n```\n\n\n## ChangeLog\n\n### 0.5.1\n\n- Support start_date \u0026 end_date key with Timestamp field.\n\n### 0.5.0\n\n- Support `json` datatype (Experimental Feature)\n\n### v0.4\n\n- Support null_rate parameter\n\n----\n\n## Development\n\n### Spotbugs\n\n- [spotbugs/spotbugs\\-gradle\\-plugin](https://github.com/spotbugs/spotbugs-gradle-plugin)\n- [Filter file — spotbugs 4\\.7\\.3 documentation](https://spotbugs.readthedocs.io/en/stable/filter.html)\n  - ja: [フィルタファイル — spotbugs 4\\.7\\.3 ドキュメント](https://spotbugs.readthedocs.io/ja/latest/filter.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuokada%2Fembulk-input-randomj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuokada%2Fembulk-input-randomj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuokada%2Fembulk-input-randomj/lists"}