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/catalog/iceberg.md
+35-2Lines changed: 35 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,7 +162,7 @@ For any server options need to be stored in Vault, you can add a prefix `vault_`
162
162
163
163
#### Additional Server Options
164
164
165
-
-`batch_size` - Controls the batch size of records read from Iceberg (default: 4096)
165
+
-`batch_size` - Controls the batch size of records read from Iceberg (value range: 1 - 65536, default: 8192)
166
166
167
167
### Create a schema
168
168
@@ -178,6 +178,8 @@ The full list of foreign table options are below:
178
178
179
179
-`table` - Fully qualified source table name with all namespaces in Iceberg, required.
180
180
-`rowid_column` - The column to use as the row identifier for INSERT operations, required for data insertion.
181
+
-`create_table_if_not_exists` - Boolean option (true/false) to automatically create the Iceberg table if it doesn't exist when inserting data, optional (default: false).
182
+
-`partition_buffer_size` - Controls the buffer size for partitioned data during insertion operations, determining how many rows are batched together before being written to Iceberg (value range: 1 - 65536, default: 8192).
-**Partition Awareness**: When possible, insert data in partition order to optimize file organization
333
335
-**Transaction Size**: Consider breaking very large inserts into smaller transactions
334
336
335
-
### Limitations for Inserts
337
+
### Automatic Table Creation
338
+
339
+
When using the `create_table_if_not_exists` option, the Iceberg FDW will automatically create the target table in Iceberg if it doesn't exist when inserting data. This is useful for ad-hoc data insertion scenarios.
340
+
341
+
```sql
342
+
create foreign table iceberg.new_table (
343
+
id bigint,
344
+
name text,
345
+
created_at timestamp
346
+
)
347
+
server iceberg_server
348
+
options (
349
+
table 'docs_example.new_table',
350
+
rowid_column 'id',
351
+
create_table_if_not_exists 'true'
352
+
);
353
+
354
+
-- when data is inserted, if the 'docs_example.new_table' doesn't exist in Iceberg,
355
+
-- it will be automatically created with a schema matching the foreign table definition
- Only append operations are supported (no upserts)
339
364
- Complex data types (nested structs, arrays, maps) have limited support
340
365
366
+
#### Automatic Table Creation Limitations
367
+
368
+
When using the `create_table_if_not_exists` option, please be aware of the following additional limitations:
369
+
370
+
-**Type Support**: Only primitive types are supported (such as boolean, integer, text, etc.). Complex types like arrays, structs, and maps are not supported for automatic table creation.
371
+
-**Partitioning**: The automatically created table will use default partitioning settings. You cannot specify custom partition or sort specifications during automatic creation.
372
+
-**Identifier Fields**: The automatically created table will not have any identifier fields specified. If you need identifier fields, you must create the Iceberg table manually beforehand.
373
+
341
374
## Limitations
342
375
343
376
This section describes important limitations and considerations when using this FDW:
0 commit comments