creditdatamw / zefaker Goto Github PK
View Code? Open in Web Editor NEWzefaker is a command-line tool for generating CSV, Excel, JSON and SQL files from a Groovy DSL
License: Apache License 2.0
zefaker is a command-line tool for generating CSV, Excel, JSON and SQL files from a Groovy DSL
License: Apache License 2.0
zefaker should be able to export to a CSV file. Users must be able to specify the delimiter they want the output CSV to use/have.
Groovy 4 is out. We should upgrade the core framework for zefaker to run on that :)
Reference: https://groovy-lang.org/releasenotes/groovy-4.0.html
Detect when generateFrom
function is not called in script and notify user that it is required.
zefaker should be able to export to a JSON file that contains an array of all the generated rows.
The script below results in an exception because of the name token in the script;
import java.time.LocalDate;
name = column(index= 0, name="name")
quantity = column(index= 1, name="quantity")
created_at = column(index= 2, name="created_at")
category = column(index= 3, name="category")
deleted = column(index= 4, name="deleted")
description = column(index= 5, name="description")
modified_at = column(index= 6, name="modified_at")
columns = [
(name): { ctx -> ctx.name().firstName() },
(quantity): { ctx -> ctx.number().numberBetween(1, 70) },
(created_at): { ctx -> LocalDate.now() },
(category): { ctx -> ctx.number().numberBetween(0, 5) },
(deleted): { ctx -> false },
(description): { ctx -> ctx.name().firstName() },
(modified_at): { ctx -> LocalDate.now() }
]
generateFrom columns
As reported by @SharkFourSix
Users should be able to write this
generateFrom([
"firstName": -> { faker -> faker.name().firstName() }
])
Which is more concise than:
generateFrom([
(column(index=0, name="firstName")): -> { faker -> faker.name().firstName() }
])
DataFaker is a fork of Java-Faker that has some additional fixes and according to this tweet fixes some CVEs.
Coordinates:
// https://mvnrepository.com/artifact/net.datafaker/datafaker
implementation group: 'net.datafaker', name: 'datafaker', version: '1.1.0'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.