FakeSource
Last updated
Last updated
FakeSource connector
The FakeSource is a virtual data source, which randomly generates the number of rows according to the data structure of the user-defined schema, just for some test cases such as type conversion or connector new feature testing
tables_configs
list
no
-
Define Multiple FakeSource, each item can contains the whole fake source config description below
schema
config
yes
-
Define Schema information
rows
config
no
-
The row list of fake data output per degree of parallelism see title Options rows Case
.
row.num
int
no
5
The total number of data generated per degree of parallelism
split.num
int
no
1
the number of splits generated by the enumerator for each degree of parallelism
split.read-interval
long
no
1
The interval(mills) between two split reads in a reader
map.size
int
no
5
The size of map
type that connector generated
array.size
int
no
5
The size of array
type that connector generated
bytes.length
int
no
5
The length of bytes
type that connector generated
string.length
int
no
5
The length of string
type that connector generated
string.fake.mode
string
no
range
The fake mode of generating string data, support range
and template
, default range
,if use configured it to template
, user should also configured string.template
option
string.template
list
no
-
The template list of string type that connector generated, if user configured it, connector will randomly select an item from the template list
tinyint.fake.mode
string
no
range
The fake mode of generating tinyint data, support range
and template
, default range
,if use configured it to template
, user should also configured tinyint.template
option
tinyint.min
tinyint
no
0
The min value of tinyint data that connector generated
tinyint.max
tinyint
no
127
The max value of tinyint data that connector generated
tinyint.template
list
no
-
The template list of tinyint type that connector generated, if user configured it, connector will randomly select an item from the template list
smallint.fake.mode
string
no
range
The fake mode of generating smallint data, support range
and template
, default range
,if use configured it to template
, user should also configured smallint.template
option
smallint.min
smallint
no
0
The min value of smallint data that connector generated
smallint.max
smallint
no
32767
The max value of smallint data that connector generated
smallint.template
list
no
-
The template list of smallint type that connector generated, if user configured it, connector will randomly select an item from the template list
int.fake.template
string
no
range
The fake mode of generating int data, support range
and template
, default range
,if use configured it to template
, user should also configured int.template
option
int.min
int
no
0
The min value of int data that connector generated
int.max
int
no
0x7fffffff
The max value of int data that connector generated
int.template
list
no
-
The template list of int type that connector generated, if user configured it, connector will randomly select an item from the template list
bigint.fake.mode
string
no
range
The fake mode of generating bigint data, support range
and template
, default range
,if use configured it to template
, user should also configured bigint.template
option
bigint.min
bigint
no
0
The min value of bigint data that connector generated
bigint.max
bigint
no
0x7fffffffffffffff
The max value of bigint data that connector generated
bigint.template
list
no
-
The template list of bigint type that connector generated, if user configured it, connector will randomly select an item from the template list
float.fake.mode
string
no
range
The fake mode of generating float data, support range
and template
, default range
,if use configured it to template
, user should also configured float.template
option
float.min
float
no
0
The min value of float data that connector generated
float.max
float
no
0x1.fffffeP+127
The max value of float data that connector generated
float.template
list
no
-
The template list of float type that connector generated, if user configured it, connector will randomly select an item from the template list
double.fake.mode
string
no
range
The fake mode of generating float data, support range
and template
, default range
,if use configured it to template
, user should also configured double.template
option
double.min
double
no
0
The min value of double data that connector generated
double.max
double
no
0x1.fffffffffffffP+1023
The max value of double data that connector generated
double.template
list
no
-
The template list of double type that connector generated, if user configured it, connector will randomly select an item from the template list
common-options
no
-
16 data matching the type are randomly generated
This is a self-defining data source information, defining whether each piece of data is an add or delete modification operation, and defining what each field stores
This case specifies the number of data generated and the length of the generated value
Randomly generated according to the specified template
Using template
The specified data generation range is randomly generated
This is a case of generating a multi-data source test.table1 and test.table2
Source plugin common parameters, please refer to for details
This example Randomly generates data of a specified type. If you want to learn how to declare field types, click .
Due to the constraints of the specification, users cannot directly create byte sequence objects. FakeSource uses strings to assign bytes
type values. In the example above, the bytes
type field is assigned "bWlJWmo="
, which is encoded from "miIZj" with base64. Hence, when assigning values to bytes
type fields, please use strings encoded with base64.