{"id":27643314,"url":"https://github.com/matrixorigin/mock-data-generator","last_synced_at":"2025-04-24T00:12:36.169Z","repository":{"id":102992760,"uuid":"495249866","full_name":"matrixorigin/mock-data-generator","owner":"matrixorigin","description":"A tool to generate mock data based on a schema.","archived":false,"fork":false,"pushed_at":"2024-11-27T06:52:56.000Z","size":20478,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-24T00:12:05.773Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matrixorigin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-23T03:50:14.000Z","updated_at":"2024-11-27T06:53:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0a6784a-552b-431d-8e93-394ac10965e3","html_url":"https://github.com/matrixorigin/mock-data-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrixorigin%2Fmock-data-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrixorigin%2Fmock-data-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrixorigin%2Fmock-data-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrixorigin%2Fmock-data-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matrixorigin","download_url":"https://codeload.github.com/matrixorigin/mock-data-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535105,"owners_count":21446508,"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-24T00:12:35.440Z","updated_at":"2025-04-24T00:12:36.156Z","avatar_url":"https://github.com/matrixorigin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# What's in Mock-Data-Generator?\n\nMock-Data-Generator is a java-based tool to generate data for mostly table data of database or other casess.\n\n# How to use Mock-Data-Generator?\n\n## 1. config table definition\n\n  ```\nname: sample1         #Table name\ncount: 10             #The count of table data\ncolumns:\n  - name: id          #The column name\n    type: auto        #The column type, the tool support some typies that will be described in following phase\n  - name: name      \n    builtin: name     #The builtin type, the tool provides lots of builtin type that will be described in following phase\n    #Prefixes\n    #There are 2 types of prefix:\n    #1. enum: format ES001,DA002\n    #2. random number: format (10000,20000)\n    prefix: ES001,DA002 \n    null_ratio: 10    #the percentage of null value\n  - name: proviceId\n    enum: 11,12,13,14 #The enum type, values is separated by [,].\n    index: proviceId  #The index tag,means each mutiple tuple[a,b,c] in which b and c is bound to a is immutable.\n  - name: proviceName\n    enum: 安徽,江苏,上海,杭州,黑龙江,吉林,北京,新疆,山东\n    ref: proviceId    #The ref tag,means this column is bound to index which name is \"proviceId\" \n  - name: age\n    type: file #only support csv file\n    path: \"/data/data.csv\" #only support absolute path\n    column: 2 # The column_index tag, means return the specific column value from file which index is [column_index]\n    group: 1 # Means all columns with the same file group will get values from a the row\n  ```\n\n## 2. execute `./run.sh`\n```\nbash boot.sh -i def/template.yaml -o mydata\n```\n\n# Supported Type\n\n| Parameters   | Description                                                 |\n|--------------|-------------------------------------------------------------|\n| auto         | auto_increment, and the value of this type is only ```\\N``` |\n| int(x,y)     | integer type, range from ```x``` to ```y```                 |\n| decimal(x,y) | decimal type, max length is ```x```, precision is  ```y```  |\n| date         | date type                                                   |\n| datetime     | datetime type                                               |\n| char(x)      | char type, length is ```x```                                |\n| varchar(x)   | varchar type,max length is ```x```                          |\n| uuid         | uuid type                                                   |\n| vector(x)    | vector type, value is between 0 and 1000                    |\n| json         | json type                                                   |\n\n\n# Builtin Type\n\n| Parameters    | Description     |\n|---------------|-----------------|\n| unique        | a unique number |\n| name          |                 |\n| phonenumber   |                 |\n| cellphone     |                 |\n| idcardnum     |                 |\n| SSN           |                 |\n| email         |                 |\n| address       |                 |\n| city          |                 |\n| carvin        |                 |\n| bankaccount   |                 |\n| province      |                 |\n| provincecode  |                 |\n| creditcard    |                 |\n| officecardnum |                 |\n| carplatenum   |                 |\n| nationality   |                 |\n| college       |                 |\n| qualification |                 |\n| countryname   |                 |\n| school        |                 |\n| usname        |                 |\n| countrycode   |                 |\n| swiftcode     |                 |\n| degree        |                 |\n| licensenum    |                 |\n| qq            |                 |\n| wechat        |                 |\n| HKphonenum    |                 |\n| ipaddrv4      |                 |\n| ipaddrv6      |                 |\n| macaddr       |                 |\n| passport      |                 |\n| passportHK    |                 |\n| passportMA    |                 |\n| passportHKMA  |                 |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixorigin%2Fmock-data-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrixorigin%2Fmock-data-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixorigin%2Fmock-data-generator/lists"}