Skip to content

Datafaker 3.0.0 (28-11-2026)

Datafaker 3.0.0 requires Java 17 or later. The upgrade guide has replacements for removed APIs and examples for the new providers.

Highlights

  • Add the Adjective, Database, and Selection providers. Selection is the replacement for the deprecated Options provider in Java and Kotlin.
  • Support percentage-weighted choices in custom YAML. A weighted branch can contain a string template or a list of templates. #1962
  • Scope temporary locale and seed settings to the calling thread with doWith. Nested calls restore the enclosing settings. #2000
  • Reduce overhead in default random generation, locale fallback, and bulk Java, JSON, and CSV generation. #2001 · Benchmark results
  • Package generated GraalVM Native Image metadata for built-in providers and locale resources. Native Image guide
  • Add a lowercase requirement to passwords and generated text, improve bulk Java record transformations, and escape raw SQL identifiers according to the selected dialect.

Upgrading from 2.x

  • Replace date() with timeAndDate(), which returns Java Time types. Use ChronoUnit for relative timestamps.
  • Move username and password calls to credentials(), and currency calls to money().
  • Pass raw schema, table, and field names to the SQL transformer. Datafaker applies the dialect's identifier quoting.
  • Check exact-value fixtures after upgrading. Provider data and ordering changed, including Vietnamese full names and the NYSE ticker list.

What's changed

New contributors

Full Changelog: https://github.com/datafaker-net/datafaker/compare/2.7.0...3.0.0

See all providers.