Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/connectors/common-options/source-common-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The old configuration name `result_table_name` is deprecated, please migrate to
| plugin_output | String | No | - | When `plugin_output` is not specified, the data processed by this plugin will not be registered as a data set `(dataStream/dataset)` that can be directly accessed by other plugins, or called a temporary table `(table)` <br/>When `plugin_output` is specified, the data processed by this plugin will be registered as a data set `(dataStream/dataset)` that can be directly accessed by other plugins, or called a temporary table `(table)` . The data set `(dataStream/dataset)` registered here can be directly accessed by other plugins by specifying `plugin_input` . |
| parallelism | Int | No | - | When `parallelism` is not specified, the `parallelism` in env is used by default. <br/>When parallelism is specified, it will override the parallelism in env. |
| metadata_datasource_id | String | No | - | The data source ID for retrieving connection configuration from Metadata Center. When specified, the connector will fetch connection details (e.g., URL, username, password) from the external metadata service instead of using direct configuration. See [Metadata SPI](../../introduction/concepts/metadata-spi.md) for more information. |
| dag-parsing.mode | Enum | No | SINGLENESS | Whether to enable parsing support for multi-table source. `SINGLENESS` processes each table with a separate source and sink; `MULTIPLEXING` processes multiple tables (such as sharded tables) with one source and one sink. |
| dag-parsing.mode | Enum | No | SINGLENESS | Whether to enable parsing support for multi-table source. `SINGLENESS` processes each table with a separate source and sink; `SHARDING` processes multiple tables (such as sharded tables) with one source and one sink. `MULTIPLEX` is deprecated: it processes multiple tables with a single source, each table using a separate sink. |

# Important note

Expand Down
17 changes: 10 additions & 7 deletions docs/en/connectors/sink/Datahub.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import ChangeLog from '../changelog/connector-datahub.md';
The DataHub sink writes SeaTunnel rows to Alibaba Cloud DataHub.

The connector supports single-table writes and multi-table writes. In multi-table
jobs, use placeholders such as `${table}` in `topic` to route records from
jobs, use placeholders such as `${table_name}` in `topic` to route records from
different input tables to different DataHub topics.

## Key features
Expand All @@ -39,9 +39,10 @@ SeaTunnel schema fields, because the sink writes values by field name.
| accessId | string | yes | - | Alibaba Cloud access ID used to access DataHub. |
| accessKey | string | yes | - | Alibaba Cloud access key used to access DataHub. |
| project | string | yes | - | DataHub project name. |
| topic | string | yes | - | DataHub topic name. Supports placeholders in multi-table jobs. |
| topic | string | yes | - | DataHub topic name. Supports placeholders such as `${table_name}` in multi-table jobs. |
| timeout | int | no | 3000 | Maximum client connection timeout in milliseconds. |
| retryTimes | int | no | 3 | Maximum retry count when writing a record fails. |
| multi_table_sink_replica | int | no | 1 | The replica number of multi table sink writer. Must be at least 1. |
| common-options | config | no | - | Sink plugin common options. See [Sink Common Options](../common-options/sink-common-options.md). |

### endpoint [string]
Expand All @@ -63,8 +64,10 @@ The DataHub project name.
### topic [string]

The DataHub topic name. For multi-table writes, this value can contain
placeholders such as `${table}`. `${table_name}` is only kept as a
deprecated compatibility alias; use `${table}` for new jobs.
placeholders such as `${table_name}`, `${database_name}` and `${schema_name}`
(supported placeholders follow the SeaTunnel `TablePlaceholder` definitions,
for example `topic = "${table_name}"`). Note that `${table}` is **not** a valid
placeholder — the topic would be created with the literal string `${table}`.

The SeaTunnel field names must match the DataHub topic fields, because the sink
writes fields by name according to the topic schema.
Expand Down Expand Up @@ -124,7 +127,7 @@ sink {
### Write Multiple Input Tables to Matching Topics

When the upstream source provides multiple tables, configure `topic` with the
`${table}` placeholder so each input table is routed to a topic with the same name.
`${table_name}` placeholder so each input table is routed to a topic with the same name.

```hocon
env {
Expand Down Expand Up @@ -167,7 +170,7 @@ sink {
accessId = "your-access-id"
accessKey = "your-access-key"
project = "demo_project"
topic = "${table}"
topic = "${table_name}"
timeout = 3000
retryTimes = 3
}
Expand All @@ -182,7 +185,7 @@ No. The connector performs best-effort writes with bounded retries (`retryTimes`

### How does multi-table routing work?

When the upstream source emits more than one table, set `topic` to a value containing the `${table}` placeholder (for example `topic = "${table}"`). Each input table is then routed to a DataHub topic that shares its name. `${table_name}` is still recognized as a deprecated alias — prefer `${table}` in new jobs. The connector does not automatically create the target topic; create it in the DataHub project beforehand and ensure its schema field names match the upstream SeaTunnel schema.
When the upstream source emits more than one table, set `topic` to a value containing the `${table_name}` placeholder (for example `topic = "${table_name}"`). Each input table is then routed to a DataHub topic that shares its name. The connector does not automatically create the target topic; create it in the DataHub project beforehand and ensure its schema field names match the upstream SeaTunnel schema.

### Why is `topic` a required field even for single-table jobs?

Expand Down
7 changes: 5 additions & 2 deletions docs/en/connectors/sink/HdfsFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ Output data to hdfs file
| filename_time_format | string | no | "yyyy.MM.dd" | Only used when `custom_filename` is `true`.When the format in the `file_name_expression` parameter is `xxxx-${now}` , `filename_time_format` can specify the time format of the path, and the default value is `yyyy.MM.dd` . The commonly used time formats are listed as follows:[y:Year,M:Month,d:Day of month,H:Hour in day (0-23),m:Minute in hour,s:Second in minute] |
| file_format_type | string | no | "csv" | We supported as the following file types:`text` `csv` `parquet` `orc` `json` `excel` `xml` `binary` `canal_json` `debezium_json` `maxwell_json`.Please note that, The final file name will end with the file_format's suffix, the suffix of the text file is `txt`. |
| filename_extension | string | no | - | Override the default file name extensions with custom file name extensions. E.g. `.xml`, `.json`, `dat`, `.customtype` |
| field_delimiter | string | no | '\001' for text and ',' for csv | Only used when file_format is text and csv,The separator between columns in a row of data. Only needed by `text` file format. |
| row_delimiter | string | no | "\n" | Only used when file_format is text,The separator between rows in a file. Only needed by `text`, `csv` and `json` file format. |
| date_format | string | no | yyyy-MM-dd | Only used when file_format is `text`, `csv`, `excel` or `xml`. Date type format, used to tell connector how to write date values. Supported formats (examples): `yyyy-MM-dd`, `yyyy.MM.dd`, `yyyy/MM/dd` |
| datetime_format | string | no | yyyy-MM-dd HH:mm:ss | Only used when file_format is `text`, `csv`, `excel` or `xml`. Datetime type format, used to tell connector how to write datetime values. Supported formats (examples): `yyyy-MM-dd HH:mm:ss`, `yyyy.MM.dd HH:mm:ss`, `yyyy/MM/dd HH:mm:ss`, `yyyyMMddHHmmss` |
| time_format | string | no | HH:mm:ss | Only used when file_format is `text`, `csv`, `excel` or `xml`. Time type format, used to tell connector how to write time values. Supported formats (examples): `HH:mm:ss`, `HH:mm:ss.SSS` |
| field_delimiter | string | no | '\001' for text and ',' for csv | Only used when file_format is `text` and `csv`. The separator between columns in a row of data. |
| row_delimiter | string | no | "\n" | Only used when file_format is `text`, `csv` and `json`. The separator between rows in a file. |
| have_partition | boolean | no | false | Whether you need processing partitions. |
| partition_by | array | no | - | Only used then have_partition is true,Partition data based on selected fields. |
| partition_dir_expression | string | no | "${k0}=${v0}/${k1}=${v1}/.../${kn}=${vn}/" | Only used then have_partition is true,If the `partition_by` is specified, we will generate the corresponding partition directory based on the partition information, and the final file will be placed in the partition directory. Default `partition_dir_expression` is `${k0}=${v0}/${k1}=${v1}/.../${kn}=${vn}/`. `k0` is the first partition field and `v0` is the value of the first partition field. |
Expand Down
4 changes: 2 additions & 2 deletions docs/en/connectors/sink/Hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ By default, we use 2PC commit to ensure `exactly-once`
| overwrite | boolean | no | false | Replace existing data before commit. Equivalent to `data_save_mode = "DROP_DATA"`. |
| data_save_mode | enum | no | APPEND_DATA | How to handle existing data before writing. `APPEND_DATA` (default), `DROP_DATA`, `CUSTOM_PROCESSING`, `ERROR_WHEN_DATA_EXISTS`. |
| schema_save_mode | enum | no | CREATE_SCHEMA_WHEN_NOT_EXIST | How to handle the target table schema before writing. `RECREATE_SCHEMA`, `CREATE_SCHEMA_WHEN_NOT_EXIST`, `ERROR_WHEN_SCHEMA_NOT_EXIST`, `IGNORE`. |
| save_mode_create_template | string | no | - | Custom DDL template used when auto-creating the target Hive table. Variables: `${database}`, `${table}`, `${rowtype_fields}`, `${rowtype_partition_fields}`, `${table_location}`. |
| save_mode_create_template | string | no | - | Custom DDL template used when auto-creating the target Hive table. Variables: `${database}`, `${table}`, `${rowtype_fields}`, `${rowtype_partition_fields}`, `${table_location}`, `${current_timestamp}`. |
| common-options | | no | - | Sink plugin common parameters. See [Sink Common Options](../common-options/sink-common-options.md). |

### table_name [string]
Expand Down Expand Up @@ -168,7 +168,7 @@ Option values:

### save_mode_create_template [string]

We use templates to automatically create Hive tables, which will create corresponding table creation statements based on the type of upstream data and schema type, and the default template can be modified according to the situation. Available template variables: ${database}, ${table}, ${rowtype_fields}, ${rowtype_partition_fields}, ${table_location}.
We use templates to automatically create Hive tables, which will create corresponding table creation statements based on the type of upstream data and schema type, and the default template can be modified according to the situation. Available template variables: ${database}, ${table}, ${rowtype_fields}, ${rowtype_partition_fields}, ${table_location}, ${current_timestamp}.

**Default value**: When not specified, uses a default PARQUET non-partitioned table template:
```sql
Expand Down
4 changes: 4 additions & 0 deletions docs/en/connectors/sink/LocalFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ By default, we use 2PC commit to ensure `exactly-once`
| filename_time_format | string | no | "yyyy.MM.dd" | Only used when custom_filename is true. |
| file_format_type | string | no | "csv" | File format type, supported: `text`, `csv`, `parquet`, `orc`, `json`, `excel`, `xml`, `binary`, `canal_json`, `debezium_json`, `maxwell_json`. |
| filename_extension | string | no | - | Override the default file name extensions with custom file name extensions. E.g. `.xml`, `.json`, `dat`, `.customtype` |
| date_format | string | no | yyyy-MM-dd | Only used when file_format_type is `text`, `csv`, `excel` or `xml`. Date type format, used to tell connector how to write date values. Supported formats (examples): `yyyy-MM-dd`, `yyyy.MM.dd`, `yyyy/MM/dd`. |
| datetime_format | string | no | yyyy-MM-dd HH:mm:ss | Only used when file_format_type is `text`, `csv`, `excel` or `xml`. Datetime type format, used to tell connector how to write datetime values. Supported formats (examples): `yyyy-MM-dd HH:mm:ss`, `yyyy.MM.dd HH:mm:ss`, `yyyy/MM/dd HH:mm:ss`, `yyyyMMddHHmmss`. |
| time_format | string | no | HH:mm:ss | Only used when file_format_type is `text`, `csv`, `excel` or `xml`. Time type format, used to tell connector how to write time values. Supported formats (examples): `HH:mm:ss`, `HH:mm:ss.SSS`. |
| multi_table_sink_replica | int | no | 1 | The replica number of multi table sink writer. Must be at least 1. |
| field_delimiter | string | no | '\001' for text and ',' for csv | Only used when file_format_type is text and csv. |
| row_delimiter | string | no | "\n" | Only used when file_format_type is `text`, `csv` and `json`. |
| have_partition | boolean | no | false | Whether you need processing partitions. |
Expand Down
Loading
Loading