生成模拟数据的工具? [英] Tools for Generating Mock Data?
问题描述
我正在寻找一个好的免费工具的建议,用于生成样本数据以加载到测试数据库中.以此类推,可以为任何 RDBMS 生成lorem ipsum"文本.我正在寻找的功能包括:
I'm looking for recommendations of a good, free tool for generating sample data for the purpose of loading into test databases. By analogy, something that produces "lorem ipsum" text for any RDBMS. Features I'm looking for include:
- 为现有表定义生成数据的灵活性.
- 能够生成大小数据集(> 100 万行或更多).
- 以 SQL 脚本格式(
INSERT
语句)或适合批量导入的平面文件格式(通常更快)生成. - 易于编写脚本的命令行界面.
- 可扩展、开源、用动态语言编写(这些都是很好的东西,而不是强要求).
- Flexibility to generate data for an existing table definition.
- Ability to generate small and large data sets (> 1 million rows or more).
- Generate in SQL script format (
INSERT
statements) or else in a flat file format suitable for bulk import (which is usually faster). - A command-line interface for easy scripting.
- Extensible, open source, written in a dynamic language (these are nice-to-haves, not strong requirements).
PS:我确实在 StackOverflow 上搜索了一个重复的问题,但没有找到.如果有的话,我会很感激得到一个指针.
PS: I did search for a duplicate question on StackOverflow, but I didn't find one. If there is one, I'll be grateful to get a pointer to it.
感谢大家的热烈响应!我应该修改我的要求,即我使用 Mac OS X 作为我的主要开发环境,而不是 Windows(尽管我确实说过命令行界面是可取的,并且实际上排除了 Windows).不过,特定于 Windows 的建议无疑对这个问题的其他读者有用,所以谢谢.
Thanks for the great responses everyone! I should amend my requirements that I use Mac OS X as my primary development environment, not Windows (though I did say command-line interface is desirable, and that practically rules out Windows). The Windows-specific suggestions will no doubt be useful to other readers of this question, though, so thanks.
这是我的结论:
- 生成数据:
- PHP Web 应用程序界面,而不是命令行
- 仅限生成 200 条记录(或支付 20 美元以获得生成 5,000 条记录的许可)
- 不是免费的,价格为 295 美元
- 需要 Windows、.NET、SQL Server
- 需要 Windows
- 需要昂贵的 MSDN 或 ISV 订阅
- 不是免费的,价格为 595 美元
- 需要 Windows (?)
- 不支持 MySQL (?)
- GUI,不是命令行或脚本
- 使用 ActiveRecord 进行批量数据加载速度太慢
- 主要是一个负载测试工具,内置随机数据生成器
- 使用起来还是很简单的
- 总体来说是一款不错的亚军工具
- 满足我需求的最佳解决方案
- XML 脚本,与 DbUnit 兼容
- 开源 (GPL) Java 代码
- 命令行使用
- 直接通过 JDBC 访问多个数据库
推荐答案
看看databene benerator,一个测试看起来接近您的要求的数据生成器.
Take a look at databene benerator, a test data generator that looks close to your requirements.
- 它可以为现有表定义生成数据(甚至匿名化生产数据)
- 它可以生成大数据集(无限大小)
- 它支持各种输入(CSV、平面文件、DBUnit)和输出格式(CSV、平面文件、DBUnit、XML、Excel、脚本)
- 它可以在命令行或通过 Maven 插件使用
- 它是开源且可定制的
我会尝试一下.
顺便说一句,类似产品的列表可在 databene benerator 的网站上找到.
BTW, a list of similar products is available on databene benerator's web site.
这篇关于生成模拟数据的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!