<commit_before># Databender

Ruby script to generate a database subset driven by configuration based rule-engine

#### Demo

![alt tag](https://github.com/rcdexta/databender/raw/master/assets/demo.gif)

#### Why

If you have to quickly boot up a micro-service or any application in your local machine and you are stuck because the service has dependent seed data that needs to be present in the database before starting up, you have couple options:

* automate data generation using tools like [bobcat](https://github.com/ThoughtWorksStudios/bobcat)
* use the fixtures that power your testing suite to generate the seed data
* generate a subset of the data from one of the working environments (staging, uat)

Databender aims to offer an easy and seamless solution to solve the last option.

#### Features

* configuration driven rule engine
* can add filters at table level or globally at column level
* can resolve sequence of tables to import based on referential integrity (foreign key dependencies)

#### Installation

Install the gem to install the command-line cli

```bash
$ gem install databender
```<commit_msg>Add gem badge to README<commit_after># Databender

Ruby script to generate a database subset driven by configuration based rule-engine

[![Gem Version](https://badge.fury.io/rb/databender.svg)](http://badge.fury.io/rb/databender)

#### Demo

![alt tag](https://github.com/rcdexta/databender/raw/master/assets/demo.gif)

#### Why

If you have to quickly boot up a micro-service or any application in your local machine and you are stuck because the service has dependent seed data that needs to be present in the database before starting up, you have couple options:

* automate data generation using tools like [bobcat](https://github.com/ThoughtWorksStudios/bobcat)
* use the fixtures that power your testing suite to generate the seed data
* generate a subset of the data from one of the working environments (staging, uat)

Databender aims to offer an easy and seamless solution to solve the last option.

#### Features

* configuration driven rule engine
* can add filters at table level or globally at column level
* can resolve sequence of tables to import based on referential integrity (foreign key dependencies)

#### Installation

Install the gem to install the command-line cli

```bash
$ gem install databender
```
{'fraction_non_alphanumeric': 0.06987643800596506, 'fraction_numerical': 0.0, 'mean_word_length': 4.7690417690417695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4761083', 'n_tokens_mistral': 622, 'n_tokens_neox': 591, 'n_words': 308}