You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/connectors/table/datagen.md
+23-8
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,21 @@ CREATE TABLE Orders (
99
99
)
100
100
```
101
101
102
+
And for collections it is possible to specify different sized collections.
103
+
104
+
```sql
105
+
CREATETABLEOrders (
106
+
f0 Array<INT>,
107
+
f1 Map<INT, STRING>,
108
+
f2 MULTISET<INT>
109
+
) WITH (
110
+
'connector'='datagen',
111
+
'fields.f0.length'='10',
112
+
'fields.f1.length'='11',
113
+
'fields.f2.length'='12'
114
+
);
115
+
```
116
+
102
117
Types
103
118
-----
104
119
@@ -289,14 +304,14 @@ Connector Options
289
304
<td>optional</td>
290
305
<td style="word-wrap: break-word;">(Minimum value of type)</td>
291
306
<td>(Type of field)</td>
292
-
<td>Minimum value of random generator, work for numeric types.</td>
307
+
<td>Minimum value of random generator, only works for numeric types.</td>
293
308
</tr>
294
309
<tr>
295
310
<td><h5>fields.#.max</h5></td>
296
311
<td>optional</td>
297
312
<td style="word-wrap: break-word;">(Maximum value of type)</td>
298
313
<td>(Type of field)</td>
299
-
<td>Maximum value of random generator, work for numeric types.</td>
314
+
<td>Maximum value of random generator, only works for numeric types.</td>
300
315
</tr>
301
316
<tr>
302
317
<td><h5>fields.#.max-past</h5></td>
@@ -308,21 +323,21 @@ Connector Options
308
323
<tr>
309
324
<td><h5>fields.#.length</h5></td>
310
325
<td>optional</td>
311
-
<td style="word-wrap: break-word;">100</td>
326
+
<td style="word-wrap: break-word;">100 for string/bytes, 3 for array/map/multiset </td>
312
327
<td>Integer</td>
313
328
<td>
314
329
Size or length of the collection for generating varchar/varbinary/string/bytes/array/map/multiset types.
315
-
Please notice that for variable-length fields (varchar/varbinary), the default length is defined by the schema and cannot be set to a length greater than it.
316
-
for super-long fields (string/bytes), the default length is 100 and can be set to a length less than 2^31.
317
-
for constructed fields (array/map/multiset), the default number of elements is 3 and can be customized.
330
+
Please note that for variable-length fields (varchar/varbinary), the default length is defined by the schema and cannot be set to a length greater than it.
331
+
For super-long fields (string/bytes), the default length is 100 and can be set to a length less than 2^31.
332
+
For constructed fields (array/map/multiset), the default number of elements is 3.
318
333
</td>
319
334
</tr>
320
335
<tr>
321
336
<td><h5>fields.#.var-len</h5></td>
322
337
<td>optional</td>
323
338
<td style="word-wrap: break-word;">false</td>
324
339
<td>Boolean</td>
325
-
<td>Whether to generate a variable-length data, please notice that it should only be used for variable-length types (varchar, string, varbinary, bytes).</td>
340
+
<td>Whether to generate a variable-length data, only works for variable-length types (varchar, string, varbinary, bytes).</td>
0 commit comments