Generate Custom Sample Data with Confluent Cloud for Apache Flink¶
Confluent Cloud for Apache Flink® enables creating tables that generate custom sample data.
User-defined faker tables enable you to create custom data generators directly within your Flink stream-processing workflows. This capability enables you to generate a continuous stream of realistic test data without additional infrastructure or costs, streamlining development and testing processes.
With a faker table, data is not being generated continuously. Instead, when a statement is started that reads from the sample data, it is instantiated in this specific context and generates data only to be read by this specific statement. If multiple statements read from the same faker table at the same time, they get different data.
Create a faker table by using the CREATE TABLE statement with special connector options that specify how data should be generated. The following code example creates a table that generates mock product data.
-- Create a faker table that generates mock product data.
CREATE TABLE products_mock (
`product_id` BIGINT NOT NULL,
`name` VARCHAR(2147483647) NOT NULL,
`brand_id` BIGINT NOT NULL,
`vendor` VARCHAR(2147483647) NOT NULL,
CONSTRAINT `PK_product_id` PRIMARY KEY (`product_id`) NOT ENFORCED
) WITH (
'changelog.mode' = 'upsert',
'connector' = 'faker',
'fields.brand_id.expression' = '#{Number.randomNumber ''3'',''false''}',
'fields.name.expression' = '#{Commerce.productName}',
'fields.product_id.expression' = '#{Number.randomNumber ''4'',''false''}',
'fields.vendor.expression' = '#{Commerce.vendor}',
'rows-per-second' = '1'
);
-- Generate mock data from the faker table.
SELECT * FROM products_mock LIMIT 2;
Your output should resemble:
product_id name brand_id vendor
6805 Intelligent Paper Plate 15 Amazon
3466 Lightweight Steel Car 130 Target
For a complete list of available expressions, see the Faker table expressions section.
You can find more examples of faker tables in the following sections.
Supported faker table options¶
The following table shows the supported options for faker tables.
| Option | Required? | Example Value | Description |
|---|---|---|---|
| changelog.mode | No | ‘upsert’ | Only append and upsert are supported. |
| connector | Yes | ‘faker’ | Specifies using the faker connector. |
| fields.<column>.expression | No | ‘#{Name.firstName}’ | The expression to use for the column. |
| number-of-rows | No | ‘100’ | The number of rows to generate. |
| rows-per-second | No | ‘1’ | The number of rows to generate per second. |
Faker table expressions¶
The following sections show the expressions that you can use in faker tables.
String fields¶
| Domain | Raw expression | In SQL (quoted) |
|---|---|---|
| Address | #{Address.city} / #{Address.streetAddress} | ‘#{Address.city}’ |
| Address | #{Address.countryCode} | ‘#{Address.countryCode}’ |
| Address | #{Address.streetAddress} / #{Address.secondaryAddress} | ‘#{Address.streetAddress}’ |
| Address | #{Address.zipCode} | ‘#{Address.zipCode}’ |
| Codes/IDs | #{Code.isbn10} / #{Code.isbn13} / #{Code.imei} | ‘#{Code.isbn13}’ |
| Commerce | #{Commerce.productName} / #{Commerce.department} / #{Commerce.material} | ‘#{Commerce.productName}’ |
| Company | #{Company.name} / #{Company.industry} / #{Company.buzzword} | ‘#{Company.name}’ |
| Currency | #{Currency.code} / #{Currency.name} | ‘#{Currency.code}’ |
| #{Internet.emailAddress} | ‘#{Internet.emailAddress}’ | |
#{Name.firstName}.#{Name.lastName}@example.com |
'#{Name.firstName}.#{Name.lastName}@example.com' |
|
| Enum pick | #{Options.option ‘A’,’B’,’C’} | ‘#{Options.option ‘’A’’,’’B’’,’’C’’}’ |
| Finance | #{Finance.iban} / #{Finance.bic} | ‘#{Finance.iban}’ |
| Geo | #{Address.latitude} / #{Address.longitude} | ‘#{Address.latitude}’ |
| IDs | #{IdNumber.valid} / #{Internet.uuid} | ‘#{IdNumber.valid}’ |
| Internet | #{Internet.password} | ‘#{Internet.password}’ |
| Internet | #{Internet.domainName} / #{Internet.url} | ‘#{Internet.domainName}’ |
| Internet | #{Internet.publicIpV4Address} / #{Internet.ipV6Address} | ‘#{Internet.publicIpV4Address}’ |
| Internet | #{Internet.macAddress} / #{Internet.userAgent} | ‘#{Internet.userAgent}’ |
| Job | #{Job.title} / #{Job.field} | ‘#{Job.title}’ |
| Lorem | #{Lorem.word} / #{Lorem.sentence} / #{Lorem.paragraph} | ‘#{Lorem.sentence}’ |
| Lorem | #{Lorem.words ‘3’} | ‘#{Lorem.words ‘’3’’}’ |
| Lorem | #{Lorem.sentences ‘2’} | ‘#{Lorem.sentences ‘’2’’}’ |
| Lorem | #{Lorem.paragraphs ‘2’} | ‘#{Lorem.paragraphs ‘’2’’}’ |
| Lorem | #{Lorem.characters ‘12’} | ‘#{Lorem.characters ‘’12’’}’ |
| Payment | #{business.creditCardNumber} / #{business.creditCardType} | ‘#{business.creditCardNumber}’ |
| Person | #{Name.firstName} | ‘#{Name.firstName}’ |
| Person | #{Name.lastName} | ‘#{Name.lastName}’ |
| Person | #{Name.fullName} | ‘#{Name.fullName}’ |
| Person | #{Name.nameWithMiddle} | ‘#{Name.nameWithMiddle}’ |
| Person | #{Name.prefix} / #{Name.suffix} | ‘#{Name.prefix}’ |
| Person | #{Name.userName} | ‘#{Name.userName}’ |
| Phone | #{PhoneNumber.phoneNumber} / #{PhoneNumber.cellPhone} | ‘#{PhoneNumber.phoneNumber}’ |
| Templating | #{numerify ‘####-####’} | ‘#{numerify ‘’####-####’’}’ |
| Templating | #{letterify ‘????’} | ‘#{letterify ‘’????’’}’ |
| Templating | #{bothify ‘??##-##??’} | ‘#{bothify ‘’??##-##??’’}’ |
| Templating | #{regexify ‘[A-Z0-9]{8}’} | ‘#{regexify ‘’[A-Z0-9]{8}’’}’ |
| Timezone | #{Address.timeZone} | ‘#{Address.timeZone}’ |
| Vehicle | #{Vehicle.vin} / #{Vehicle.manufacturer} / #{Vehicle.model} | ‘#{Vehicle.vin}’ |
| Weighted | #{Options.option ‘gold’,’gold’,’silver’,’bronze’} | ‘#{Options.option ‘’gold’’,’’gold’’,’’silver’’,’’bronze’’}’ |
Integer / Long fields¶
| Data type | Purpose | Raw expression | In SQL (quoted) |
|---|---|---|---|
| Integer/Long | Age | #{Number.numberBetween ‘18’,’65’} | ‘#{Number.numberBetween ‘’18’’,’’65’’}’ |
| Integer/Long | Fixed digits | #{Number.randomNumber ‘5’,’true’} | ‘#{Number.randomNumber ‘’5’’,’’true’’}’ |
| Integer/Long | Quantity | #{Number.numberBetween ‘1’,’10000’} | ‘#{Number.numberBetween ‘’1’’,’’10000’’}’ |
| Integer/Long | Range | #{Number.numberBetween ‘0’,’100000’} | ‘#{Number.numberBetween ‘’0’’,’’100000’’}’ |
Decimal / Double / Money fields¶
| Data type | Purpose | Raw expression | In SQL (quoted) |
|---|---|---|---|
| Decimal/Double | Bounded w/ scale | #{Number.randomDouble ‘2’,’0’,’9999’} | ‘#{Number.randomDouble ‘’2’’,’’0’’,’’9999’’}’ |
| String (money) | Price string | #{Commerce.price} | ‘#{Commerce.price}’ |
Boolean fields¶
| Data type | Purpose | Raw expression | In SQL (quoted) |
|---|---|---|---|
| Boolean | Biased (~60/40) | #{Options.option ‘true’,’true’,’true’,’false’,’false’} | ‘#{Options.option ‘’true’’,’’true’’,’’true’’,’’false’’,’’false’’}’ |
Date / Time / Timestamp fields¶
| Data type | Purpose | Raw expression | In SQL (quoted) |
|---|---|---|---|
| Date | Birthday 18–65 | #{Date.birthday ‘18’,’65’} | ‘#{Date.birthday ‘’18’’,’’65’’}’ |
| Date/Time | Between dates | #{Date.between ‘2022-01-01’,’2022-12-31’} | ‘#{Date.between ‘’2022-01-01’’,’’2022-12-31’’}’ |
| Date/Time | Future N days | #{Date.future ‘7’,’DAYS’} | ‘#{Date.future ‘’7’’,’’DAYS’’}’ |
| Date/Time | Past hours | #{Date.past ‘12’,’HOURS’} | ‘#{Date.past ‘’12’’,’’HOURS’’}’ |
| Date/Time | Past N days | #{Date.past ‘30’,’DAYS’} | ‘#{Date.past ‘’30’’,’’DAYS’’}’ |
File / Media / Miscellaneous fields¶
| Data type | Domain | Raw expression | In SQL (quoted) |
|---|---|---|---|
| String | File | #{File.fileName} | ‘#{File.fileName}’ |
| String | File | #{File.extension} / #{File.mimeType} | ‘#{File.mimeType}’ |
| String | Image | #{Placeholdit.image ‘200’,’300’} | ‘#{Placeholdit.image ‘’200’’,’’300’’}’ |
| String | Locale | #{Nation.language} / #{Nation.nationality} | ‘#{Nation.language}’ |
Work with faker tables¶
Default faker table¶
The following code example creates a faker table that generates mock data with the default settings.
-- Create a faker table that generates mock data with the default settings.
CREATE TABLE faker_default (
id BIGINT,
name STRING,
email STRING,
city STRING
) WITH (
'connector' = 'faker'
);
-- Generate mock data from the faker table.
SELECT * FROM faker_default LIMIT 2;
Your output should resemble:
id name email city
658137 hfucj zufpk ltuot
71500 timdz pyons bdczt
Modify a faker table¶
The following code example shows how to use the ALTER TABLE statement to modify an existing faker table.
-- Create a faker table that generates mock data with the default settings.
CREATE TABLE faker_basic (
id BIGINT,
name STRING,
email STRING,
city STRING
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'fields.id.expression' = '#{Number.numberBetween ''1'',''1000000''}',
'fields.name.expression' = '#{Name.name}',
'fields.email.expression' = '#{Internet.emailAddress}',
'fields.city.expression' = '#{Address.city}',
'rows-per-second' = '5'
);
-- Generate mock data from the faker_like table.
SELECT * FROM faker_basic LIMIT 2;
Your output should resemble:
id name email city
583421 Reena Ortiz jeff.auer@yahoo.com Koelpintown
446894 Janel Howe ruth.shields@hotmail.com Lake Kirstinmouth
Run the following command to alter the name field in the faker_basic
table to generate full names.
ALTER TABLE faker_basic
SET ('fields.name.expression' = '#{Name.fullName}');
-- Generate mock data from the faker_basic table.
SELECT * FROM faker_basic LIMIT 2;
Your output should resemble:
id name email city
617469 Dr. Clemente Kassulke johanne.emard@gmail.com South Arieborough
773314 Walker VonRueden III paris.stoltenberg@gmail.com Ferryborough
Use the LIKE clause to copy a faker table’s schema¶
You can use the LIKE clause to copy a faker table’s schema. Use the EXCLUDING merging strategy to exclude unnecessary options.
The following code example creates a faker table that generates mock data with
the same schema as the faker_src table.
-- Create the source faker table.
CREATE TABLE faker_src (
id BIGINT,
name STRING,
email STRING,
city STRING
) WITH (
'connector' = 'faker'
);
-- Create a faker table that generates mock data with the same schema
-- as the faker_src table.
CREATE TABLE faker_like LIKE faker_src;
-- Generate mock data from the faker_like table.
SELECT * FROM faker_like LIMIT 2;
Your output should resemble:
id name email city
658137 hfucj zufpk ltuot
71500 timdz pyons bdczt
Generate NULL data with a NULL rate¶
The following code example creates a faker table that generates mock data with a NULL rate of 50 percent.
CREATE TABLE faker_nulls (
name STRING
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'fields.name.expression' = '#{Name.name}',
'fields.name.null-rate' = '0.5',
'rows-per-second' = '5'
);
-- Generate mock data from the faker table.
SELECT * FROM faker_nulls LIMIT 10;
Your output should resemble:
name
Hunter Stoltenberg IV
Glen Kuhlman
NULL
NULL
NULL
Marco Kerluke
NULL
NULL
Abe Corkery
Homer Pfeffer
Generate one-of columns¶
The following code example creates a faker table that picks a random value from
a list of options by using an Options.option expression.
CREATE TABLE order_status_faker (
`order_id` INT,
`order_status` STRING
)
WITH (
'connector' = 'faker',
'fields.order_id.expression' = '#{Number.numberBetween ''0'',''100''}',
'fields.order_status.expression' = '#{Options.option ''RECEIVED'',''SHIPPED'',''CANCELLED''}'
);
-- Generate mock data from the faker table.
SELECT * FROM order_status_faker LIMIT 10;
Your output should resemble:
order_id order_status
33 CANCELLED
4 RECEIVED
77 CANCELLED
99 SHIPPED
10 RECEIVED
22 CANCELLED
55 CANCELLED
66 RECEIVED
88 SHIPPED
21 SHIPPED
Generate data for collections¶
Generate ARRAY data¶
The following code example creates a faker table that generates mock array data.
CREATE TABLE faker_array (
tags ARRAY<STRING>,
floats ARRAY<FLOAT>
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'fields.tags.length' = '2',
'fields.tags.expression' = '#{Lorem.words ''3''}',
'fields.floats.length' = '3',
'fields.floats.expression' = '#{Number.randomDouble ''2'',''0'',''10''}',
'rows-per-second' = '5'
);
-- Generate mock data from the faker table.
SELECT * FROM faker_array LIMIT 2;
Your output should resemble:
tags floats
[[omnis, qui, animi], [qui, et, omnis]] [9.31, 3.49, 8.7]
[[amet, omnis, ducimus], [eum, corporis, magni]] [0.77, 5.11, 2.46]
Generate MAP data¶
The following code example creates a faker table that generates mock MAP data.
CREATE TABLE faker_map (
attrs MAP<STRING, INT>
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'fields.attrs.length' = '3',
'fields.attrs.key.expression' = '#{Lorem.words ''3''}',
'fields.attrs.value.expression' = '#{Number.numberBetween ''1'',''10''}',
'rows-per-second' = '5'
);
-- Generate mock data from the faker table.
SELECT * FROM faker_map LIMIT 2;
Your output should resemble:
attrs
{voluptatem=5, consectetur=3, non=1}
{hic=5, mollitia=1, atque=2}
Generate MULTISET data¶
The following code example creates a faker table that generates mock MULTISET data.
CREATE TABLE faker_multiset (
id BIGINT,
tags MULTISET<STRING>
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'fields.id.expression' = '#{Number.randomNumber ''4'',''false''}',
'fields.tags.length' = '4',
'fields.tags.expression' = '#{Lorem.words ''2''}',
'rows-per-second' = '5'
);
-- Generate mock data from the faker table.
SELECT * FROM faker_multiset LIMIT 2;
Your output should resemble:
id tags
139 {[ullam, eveniet]=1, [accusantium, iure]=1, [in, est]=1, [ea, similique]=1}
7168 {[nisi, pariatur]=1, [tempora, ullam]=1, [atque, ea]=1, [nisi, molestias]=1}
Generate ROW data¶
The following code example creates a faker table that generates mock row data.
CREATE TABLE faker_row (
name STRING,
email STRING,
addr ROW<city STRING, zip STRING>
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'rows-per-second' = '5',
'fields.name.expression' = '#{Name.name}',
'fields.email.expression' = '#{Internet.emailAddress}',
'fields.addr.city.expression' = '#{Address.city}',
'fields.addr.zip.expression' = '#{Address.zipCode}'
);
Your output should resemble:
name email addr
Santiago Stiedemann ethan.von@yahoo.com (Cassinmouth, 02253)
Delores Murray cristine.okuneva@hotmail.com (New Santana, 04034)
Example business objects¶
Category data¶
The following code example creates a faker table that generates mock category data.
-- Create a faker table that generates mock category data.
CREATE TABLE categories (
`category_id` BIGINT NOT NULL,
`name` STRING NOT NULL,
CONSTRAINT `PK_category_id` PRIMARY KEY (`category_id`) NOT ENFORCED
) WITH (
'changelog.mode' = 'upsert',
'connector' = 'faker',
'fields.category_id.expression' = '#{Number.randomNumber ''2'',''false''}',
'fields.name.expression' = '#{Commerce.department}',
'rows-per-second' = '1'
);
-- Generate mock data from the faker table.
SELECT * FROM categories LIMIT 2;
Your output should resemble:
category_id name
66 Books
86 Automotive
Customers¶
The following code example creates a faker table that generates mock customer data.
-- Create a faker table that generates mock customer data.
CREATE TABLE `customers_fake` (
`customer_id` BIGINT NOT NULL,
`name` VARCHAR(2147483647) NOT NULL,
`address` VARCHAR(2147483647) NOT NULL,
`postcode` VARCHAR(2147483647) NOT NULL,
`city` VARCHAR(2147483647) NOT NULL,
`email` VARCHAR(2147483647) NOT NULL,
CONSTRAINT `PK_customer_id` PRIMARY KEY (`customer_id`) NOT ENFORCED
) WITH (
'changelog.mode' = 'upsert',
'connector' = 'faker',
'fields.address.expression' = '#{Address.streetAddress}',
'fields.city.expression' = '#{Address.city}',
'fields.customer_id.expression' = '#{Number.randomNumber ''5'',''false''}',
'fields.email.expression' = '#{Internet.emailAddress}',
'fields.name.expression' = '#{Name.fullName}',
'fields.postcode.expression' = '#{Address.postcode}',
'rows-per-second' = '1'
);
-- Generate mock data from the faker table.
SELECT * FROM customers_fake LIMIT 2;
Your output should resemble:
customer_id name address postcode city email
3134 Dr. Andrew Terry 45488 Eileen Walk 78690 Latoyiaberg romaine.lynch@hotmail.com
3243 Miss Shelby Lueilwitz 199 Bernardina Brook 79991 Johnburgh dominick.oconner@hotmail.c…
Email fields¶
The following code example creates a faker table that generates mock email data.
-- Create a faker table that generates mock email data.
CREATE TABLE faker_basic (
id BIGINT,
name STRING,
email STRING,
city STRING
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'fields.id.expression' = '#{Number.numberBetween ''1'',''1000000''}',
'fields.name.expression' = '#{Name.name}',
'fields.email.expression' = '#{Internet.emailAddress}',
'fields.city.expression' = '#{Address.city}',
'rows-per-second' = '5'
);
-- Generate mock data from the faker table.
SELECT * FROM faker_basic LIMIT 2;
Your output should resemble:
id name email city
946836 Maile Nader Jr. bobby.paucek@gmail.com Carmeliachester
371664 Dewitt Kemmer shelby.harvey@yahoo.com Renaldoton
Order data¶
The following code example creates a faker table that generates mock order data.
-- Create a faker table that generates mock order data.
CREATE TABLE `orders` (
`order_id` VARCHAR(2147483647) NOT NULL,
`customer_id` INT NOT NULL,
`product_ids` ARRAY<BIGINT> NOT NULL,
`price` DECIMAL(10,2) NOT NULL
) WITH (
'changelog.mode' = 'append',
'connector' = 'faker',
'fields.customer_id.expression' = '#{Number.randomNumber ''5'',''false''}',
'fields.order_id.expression' = '#{Internet.UUID}',
'fields.price.expression' = '#{Number.randomDouble ''2'', ''10'', ''500''}',
'fields.product_ids.expression' = '#{Number.randomNumber ''4'',''false''}',
'fields.product_ids.length' = '5',
'rows-per-second' = '1'
);
-- Generate mock data from the faker table.
SELECT * FROM orders LIMIT 2;
Your output should resemble:
order_id customer_id product_ids price
e6bbd9ae-a03f-43cb-8018-01a25f52c99b 3134 [5436, 796, 2373, 8492, 6236] 231.02
cbb4a3c9-0c24-4171-a4dc-729d7be34d97 3243 [4357, 5565, 2598, 5551, 5753] 48.74
Product categories¶
The following code example creates a faker table that generates mock product category data.
-- Create a faker table that generates mock product category data.
CREATE TABLE product_categories (
`product_id` BIGINT NOT NULL,
`category_id` BIGINT NOT NULL,
`is_active` BOOLEAN NOT NULL,
CONSTRAINT `PK_product_category_id` PRIMARY KEY (`product_id`, `category_id`) NOT ENFORCED
) WITH (
'changelog.mode' = 'upsert',
'connector' = 'faker',
'fields.category_id.expression' = '#{Number.randomNumber ''2'',''false''}',
'fields.product_id.expression' = '#{Number.randomNumber ''4'',''false''}',
'fields.is_active.expression' = '#{Options.option ''TRUE'',''FALSE''}',
'rows-per-second' = '1'
);
-- Generate mock data from the faker table.
SELECT * FROM product_categories LIMIT 2;
Your output should resemble:
product_id category_id is_active
6805 66 TRUE
3466 86 FALSE
Product details¶
The following code example creates a faker table that generates mock product details.
-- Create a faker table that generates mock product details.
CREATE TABLE `product_details` (
`product_id` BIGINT NOT NULL,
`dimensions` ROW<`length` STRING, `width` STRING, `height` STRING>,
`initial_release_date` STRING,
CONSTRAINT `PK_product_id` PRIMARY KEY (`product_id`) NOT ENFORCED
) WITH (
'changelog.mode' = 'upsert',
'connector' = 'faker',
'fields.product_id.expression' = '#{Number.randomNumber ''4'',''false''}',
'fields.dimensions.length.expression' = '#{Number.randomDouble ''2'', ''5'', ''500''}cm',
'fields.dimensions.width.expression' = '#{Number.randomDouble ''2'', ''5'', ''500''}cm',
'fields.dimensions.height.expression' = '#{Number.randomDouble ''2'', ''1'', ''1000''}cm',
'fields.initial_release_date.expression' = '#{Number.numberBetween ''0'', ''1000000000''}',
'rows-per-second' = '1'
);
-- Generate mock data from the faker table.
SELECT * FROM product_details LIMIT 2;
Your output should resemble:
product_id dimensions initial_release_date
1019 (93.55cm, 65.08cm, 366.88cm) 959199498
5104 (93.55cm, 65.08cm, 366.88cm) 909599576
TIMESTAMP and DATE data¶
For rows of type TIMESTAMP and DATE, the corresponding expression must return a
timestamp formatted as yyyy-mm-dd hh:mm:ss[.nnnnnnnnn].
The following code example creates a faker table that generates mock TIMESTAMP and DATE data.
timestamp1: the table generates a random timestamp that occurs at most 15 seconds in the past.timestamp2: the table generates a random timestamp that occurs at most 15 seconds in the past, but at least 5 seconds.timestamp3: the table generates a random timestamp that occurs at most 15 seconds in the future, but at least 5 seconds.time: the table generates a random time that occurs at most 15 seconds in the future, but at least 5 seconds.date: the table generates a random birthday between 1 and 100 years ago.
CREATE TABLE faker_time (
`timestamp1` TIMESTAMP(3),
`timestamp2` TIMESTAMP(3),
`timestamp3` TIMESTAMP(3),
`time` TIME,
`date` DATE
) WITH (
'connector' = 'faker',
'fields.timestamp1.expression' = '#{date.past ''15'',''SECONDS''}',
'fields.timestamp2.expression' = '#{date.past ''15'',''5'',''SECONDS''}',
'fields.timestamp3.expression' = '#{date.future ''15'',''5'',''SECONDS''}',
'fields.time.expression' = '#{date.future ''15'',''SECONDS''}',
'fields.date.expression' = '#{date.birthday ''1'',''100''}'
);
-- Generate mock data from the faker table.
SELECT * FROM faker_time LIMIT 2;
Your output should resemble:
timestamp1 timestamp2 timestamp3 time date
2025-10-15 14:47:54.938 2025-10-15 14:47:47.591 2025-10-15 14:48:16.789 14:48:07 2009-04-01
2025-10-15 14:47:51.761 2025-10-15 14:47:56.802 2025-10-15 14:48:11.148 14:48:06 1949-12-08
Faker table errors¶
Upsert without primary key error¶
The following code example generates an error, because an upsert table requires a PRIMARY KEY constraint.
CREATE TABLE faker_upsert_error (
id BIGINT,
name STRING,
email STRING,
city STRING
) WITH (
'connector' = 'faker',
'changelog.mode' = 'upsert'
);
Type-mismatch error¶
The following code example generates an error, because the expression for the
INT field n is of type STRING.
CREATE TABLE faker_type_mismatch_error (
n INT
) WITH (
'connector' = 'faker',
'changelog.mode' = 'append',
'fields.n.expression' = '#{Internet.emailAddress}'
);