Skip to content

Data Generator application based on Profiles.

Notifications You must be signed in to change notification settings

rosselli/data-gen.projects

Repository files navigation

Data-Gen

Data Generator application based on Profiles.
You just have to create a profile and generate your data in four formats (CSV, JSON, SQL's insert, SQLite).

I described in the article What's the size of the data? my motivation to develop this project.

A hidden advantage of the Data-Gen is to estimate the size of a given data structure will have in a database and/or in a request's payload.

Usage

After git clone type on console php artisan rosselli:data-gen.

Artisan Commands

Available commands.

Artisan Commands

Profiles

A profile is the data structure (schema) that will be generated. For example, the Post schema is user_id, category_id, title, resume, text, image, caption, tags, created_at.

  1. Create a class in App\Http\Controllers\Profiles.
  2. Extend Profile class Posts extends Profiles.
  3. Call Profile's constructor parent::__construct($records)
  4. Implement the Profile's abstract methods setTableName(), setFolderName(), generateData()
  5. With Faker library, implement the schema.

Schema

Records

Data-Gen has six predefined sets of records to generate.

Report

If you want to customize the sets, edit app/Console/Commands/DataGen.php

Formats

Data-Gen generates data in CSV, JSON, SQL's Insert, and Sqlite.

Storage

The data is generated in storage/app/data-gen/[profile].

Report

After generating the data, type on console php artisan rosselli:report.

Report

About

Data Generator application based on Profiles.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published