data-genesis
Module for faking data into kafka
Last updated 2 years ago by dvorsky .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install data-genesis 
SYNC missed versions from official npm registry.

Data Genesis

Data Faker for your local needs.

You pass it data along with avro schema and it will push it into your local kafka.

It will push in interval you pass and endlessly loop that data (you can pass false to "endless")

Usage

Project

npm install @dapp/data-genesis --saveDev

import { Faker } from "data-genesis";

const faker = new Faker("path/to/your/data.json", topicName, "path/to/config.json");

await faker.generateAvro();
await faker.stream(interval: number, endless: boolean);

Global

npm install -g @dapp/data-genesis

data-genesis -i examples/data/TradeCollectionData.json  -t "fake_topic" -c examples/config/kafka.json --interval 500
  -i, --input <input-data-src>              Path to file which you want to use as fake data 
  -t, --output-topic <output-kafka-topic>   Topic to which you want to send fake data       
  -c, --kafka-config <kafka-config-src>     Kafka config                                    
  -s, --schema-dir <schema-directory-src>   Directory where schemas will be saved           
  --interval <message-interval>             Interval in which messages will send            
  -h, --help                                Print this usage guide.                         

Examples

Data

Config

Data

Your data needs to be JSON format and contain avro schema as first item.

Current Tags

  • 0.1.0                                ...           latest (2 years ago)

1 Versions

  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (10)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |