Faker connector

The Faker connector generates rows with realistic values, such as names, addresses, and email addresses. It is a source only. You describe each column with an expression of the Java Faker library.

Example

CREATE TABLE customers_gen (
  name STRING,
  email STRING,
  city STRING
) WITH (
  'connector' = 'faker',
  'rows-per-second' = '5',
  'fields.name.expression' = '#{Name.fullName}',
  'fields.email.expression' = '#{Internet.emailAddress}',
  'fields.city.expression' = '#{Address.city}'
);

Properties

Table 1. Properties of the Faker connector
PropertyDescription
connectorfaker
fields.<column>.expressionThe Faker expression for the column. It is mandatory for each column.
rows-per-secondThe maximum number of rows per second. The default is 10000.
number-of-rowsThe number of rows to produce. By default, the table is unbounded.
fields.<column>.null-rateThe share of rows in which the column is null, from 0 to 1.
fields.<column>.lengthThe size of an array, map, or multiset column. The default is 100.

For the list of expressions, see Flink Faker on GitHub.